101 Exercises

Instructions

Quick Start

  1. Create yourself an account on Glitch.com
  2. Click on the fish icon in the upper right and select "Remix on Glitch" to make your own copy
  3. Use Glitch.com as your editor

Orientation

  • index.html is the page that runs all the JS contained in 101-exercises.js
  • Open the JavaScript console in Firefox or Chrome. F12 usually works.
  • Start writing solutions inside of 101-exercises.js in the editor.
  • Refresh index.html to re-run any new changes from 101-exercises.js

Rationale

101 Exercises exists to help learners gain deep practice with fundamentals, operators, syntax, and converting problems in English to solutions in JS.

The best way to learn how to program is write programs. Each exercise is a tiny little program.

Expect to do a tremendous amount of search engine searches, make many mistakes, and try again. This is all part of programming. Take breaks.


Troubleshooting

General Guidance

  • JS Code runs from top to bottom
  • Any error in your JS code keeps the following code from running.
  • Double check your spelling. Capitalization matters in programming.
  • If you're sure you spelled something, check it anyways.

Error messages

Reference Error means you need to define the variable or function.
The number by the 101-exercises.js filename highlights the line where the variable is referenced before it exist

image of a reference

Syntax Error means there's a syntax error that needs to be fixed.
The number by the 101-exercises.js filename highlights the line where the syntax error exists.

image of a syntax error

Uncaught Error means the answer is incorrect and doesn't match the test.
The number by the 101-exercises.js filename highlights the line for the exercise where the expected value in the test does not match the actual value provided by the attempted solution. Ignore the line number 6 in assert.js.

uncaught error message

If you notice any typos, misspellings, or mistakes, please triple check your work and open an issue on GitHub citing both the line number and exercise number.

Problems Correct