Skip to content

9-5-pursuit/lab-higher-order-functions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Higher Order Functions Lab

In this lab, you'll practice writing functions that have a callback as one of their parameters. While there's not much code to write, this lab will likely be conceptually quite tricky.

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 complete the functions inside of the index.js file. For each function, you will have the majority of the code already there. You should not change any of the existing code and instead just add the one to three lines, where specified, that will use the callback.

Instructions and examples can be found in both the index.js file and the test files.

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.

Releases

No releases published

Packages

No packages published