Skip to content

LaneLourcey/loop-refactor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Refactor Loops Using Higher-Order Functions

Refactor the five functions in main.js to use higher-order functions (HOFs) rather than for-loops.

Choose from the following HOFs:

  • map
  • filter
  • reduce
  • every
  • some

Each of these HOFs should be used exactly once in the refactor.

Before refactoring, examine the existing code and tests for each function in order to understand the expected inputs and outputs.

Run npm install to install the required dependencies.

Run the command npm test to test. The tests check for expected outputs and the absence of for-loops. Do not submit your solutions until all tests are passing.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%