If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Challenge: Pair programming

Instructions

Step 1

Debug the syntax errors

When Keisha runs her program, she gets an error. She forgot to test her code as she went, so there might be several different bugs hiding. She suggests you pair program to fix them together!

  • Run the program and examine the error message in the console.
  • Use the error message and linter to identify and fix the bug.
  • Repeat, until the program runs without any errors.

Pay attention to the line of code that the error message points to. Be sure to keep the intent of the program the same - Keisha won’t be satisfied if you just delete lines of code!

Code editor

Code files

Output