Modern JavaScript Features Lab

You've been tasked with updating some code to rely on more modern JavaScript features. Each of the functions in the index.js file work just fine, but lack some newer features of JavaScript. Update those functions while keeping their functionality!

Getting started

  1. Fork and clone this repository.

  2. Navigate to the cloned repository's directory on your command line. Then, run the following command:

    npm install
    

    This will install the libraries needed to run the tests.

  3. Open up the repository in VSCode. Follow the instructions below to complete the Lab.

Instructions

You'll update three functions inside of the index.js file. For each function, you will need to follow the comments and the tests to update the code. You should not need ot make any other changes to the code other than what is asked of you.

The failing tests in this lab are looking for specific syntax in your code. Because these tests can be a bit finicky, reach out to an instructor if you think you've completed what's been asked of you but still have failing tests.

Tests

To run the tests, you can run the following command from the command line. You will need to be in the root directory of your repository.

npm test

This will run the test output once.

Test watcher

If you'd like, you can have the tests run constantly. This means that each time you save your file, your tests will re-run. To do so, you can run the following:

npm run watch

Follow the on-screen prompts to exit out of the constant runner.