Skip to content

About

A lesson by appacademy.io

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

1 Commit

Folders and files

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.

About

A lesson by appacademy.io

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages