How Coding Exercises Work
A coding exercise runs right here in your browser, so you don’t need to open your project or a terminal for it. Write your code in the editor above, then click Run Tests or press Ctrl+Enter (Cmd+Enter on macOS). Automated tests run your code and mark each test as passed or failed.
Run the tests early and often, even before you change anything, so you can see what they check. A failing test’s message tells you what the test tried and what it expected, so read it before you edit. Fix the first failing test, then run the tests again. A different failing test usually means that you’ve made progress!
Note: If every test fails with the same short error, then JavaScript couldn’t read your code. Check the line that the message names and fix that first.
Getting stuck is normal, and it’s part of practicing. The Hints tab nudges you one step at a time, so see whether one hint is enough to get you going before you open the next. You can also ask your mentor about the exercise and your code at any time.