CHECK FOR UNDERSTANDING: This loop will run once for each letter in the string "PANTHERS".

The string value is letter and stores one value from the string "PANTHERS" each time the loop runs: first "P", then "A", "N", "T", "H", "E", "R" and finally "S". The loop stops after the last value.

Each time the loop runs the current value of letter is added to the string cheer using the += operator.

  • Click Run and watch the stage. Then use the code to answer the questions.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)