STEP 15: If the player is correct, we need to let them know and stop asking them for guesses!

  • Change the string in .say() to "That's right!"
  • In LOGIC, click , drag out Break and drop it indented inside the if-statement.

The break keyword tells our program to stop running the loop if it reaches that line of code.

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)