Skip to content

Latest commit

 

History

History
19 lines (15 loc) · 482 Bytes

README.md

File metadata and controls

19 lines (15 loc) · 482 Bytes

alternate caps

  • given a string, create a new string with every other letter capitalized
  • example:
    • parameters: "amazing"
    • return: "aMaZiNg"

human-level instructions

  • create variable to store new string
  • start a loop to proceed through the string
    • get a new letter from the string
      • store it in a variable
    • get the next letter from the string
      • store it in a variable
      • capitalize it
    • add the regular and capitalized letters to the new string
  • repeat