- Use conditional statements to control the logical flow of an application
-
Fork this repository and clone your forked version to your machine
-
Install dependencies by running the command below while in the project's root directory:
npm ci
-
Read through the numbered comments in the following files to understand the requirements of this exercise.
src/boolean-conditions.jssrc/numeric-conditions.jssrc/string-conditions.jssrc/multiple-conditions.js
-
Write your code directly below the numbered comment.
-
Add
console.log()s to get visibility on your solution and run the file with the commandnode src/<file>.jsetc -
See
src/example.jsfor some examples
-
To verify your solutions, run the test suite by running the
npx jasminecommand followed by the path to the corresponding test file for eachsrc/*.jsfile above, eg:npx jasmine spec/boolean-conditions.spec.js -
Alternatively, run:
npm test -
To begin with, almost all of the tests will fail - example tests, if they exist, will pass with a green
.You'll see a number of redFs in your console (possibly many), similar to the image below: -
Your solution is complete when the all the red
Fs have been replaced with green.s in your console, as shown below:

