Skip to content

Latest commit

 

History

History
15 lines (10 loc) · 520 Bytes

README.md

File metadata and controls

15 lines (10 loc) · 520 Bytes

functional-programming-exercise

Shopping cart

The goal of this exercise is to simulate a shopping card. The result of the function is a console.log which prints the end state of the shopping cart. In this case a shopping card with one entry in the purchases array with the corrected (tax) price.

  1. Add items to cart
  2. Add 21% to item in chart
  3. Buy item: cart ---> purchases
  4. Empty card
  5. (bonus) Save the history of each action (state management)

Development

Run node index.js to execute the code.