These are exercises to help you learn how to write basic algorithms and test your understanding on programming logic.
To get started, download this project onto your machine.
In your web browser, looking at index.html page that is within the assignment folder, you'll see a page that shows a bunch of failing JavaScript tests.
Your job is to make all these JavaScript tests pass by completing their respective puzzle.
- Open the
assignment/assignment.js
file in your text editor. - Read the instructions for each problem.
- Solve the problem by writing JavaScript.
Once it's ready, test your solution.
- Tab over to the browser with
Command + Tab
. - Refresh the browser with
Command + R
. - Scroll to the puzzle's test and see if it's still red.
- Once the test is green, you've solved the puzzle.
You can see how each test invokes the problem's solution by clicking on the test description.
You may encounter challenges that seem confusing or impossible. Don't despair! This exercise is designed to challenge you. Resist the urge to just copy-and-paste code from your classmates, but definitely ask for help and talk to your peers.
When you're done with the main assignment, your page should look like this. Green check marks next to each test means the entire test suite is passing.
If your code has an error, all of the tests will fail without warning or explanation. Check your syntax.