The purpose of this exercise is to practice working with loops and conditionals. Think of it as doing reps or practicing scales! The more you practice, the better you'll get.
- Fundamental JavaScript: syntax, data types, and arrays
- Conditions, including
if
,if
/else
, andif
/else if
/else
- Loops, both
for
loops andwhile
loops
- Fork and clone this repository.
- Change into the new directory.
- Fulfill the listed requirements.
Starter code is available in lib/challenge.js
.
There are a series of prompts inside lib/challenge.js
.
Work through all of the prompts. Each prompt is in the form of a JavaScript
comment. Write your code to solve the prompt after the comment. Commit your code
after you solve a prompt.
Some prompts will require you to practice researching methods we did not learn in class. This is intended to help you learn to become a more independent developer.
If you're curious about whether your code passes the tests written for this assignment, you can do the following:
- From inside this directory, run
npm install
in your terminal. This will download the testing dependencies (mocha and chai). - Run
npm test
in the directory. Read the output to checkout which tests your code is passing and failing. - If there are any errors, try fixing them and running the code again.