STEP 13: Let's add an if statement so our program will know whether to award points or take them away.

  • Go to and drag if inside the click event.
  • Change the test variable to sprite_img and the test value to "shark".
  • Go to and drag Add Value inside the if statement. Change the variable to score.

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)