js-munich-2020-spring

Lesson 8 Classwork

Let’s practice working with loops

Spec

Start with the boilerplate here

We have a list of products displayed in the web page. When user clicks on “Add to shopping car” button. the application should be able to store each product and when user clicks on “Show shopping cart list” button displays the shopping cart list.

ToDo

  1. Save each product with name and price attribute when that the user clicks on “Add to shopping car” button in an array.
  2. Create one function which display the list of products in your shopping cart when the user clicks on “Show shopping cart list” button.

Bonus

  1. Create one function which display the total price when the user clicks on “Show total Price” product.