Skip to content

robin-dc/Dry-Coding-Practice

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Practice: Making Code DRY

In this practice, you will use the DRY principle to abstract a pattern into a helper function.

Set Up

Clone the practice from the starter.

Run npm install to install all dependencies.

Directions

You will find four functions in the file practice.js. If you run npm test now, you should see all the specs testing those four functions passing. Your job is to look at the four functions and identify where you may be able to refactor by creating a single helper function that is used in all four functions to help DRY this code.

When you are sure that you have successfully refactored the code, run npm test to see if the functions still return the correct information by making sure all the test specs still pass.

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%