exercise: Shopping list

Repo: boolean-uk-js-shopping-list

Description We have another exercise for you! We want you to create a shopping list price displayer. You should be able to see in a list each item followed by its price!

Instructions

  • Use these items and it's respective prices as a starting point: Milk at £1,20, Cocoa at £2,00, Salad at £2,00, Carrots at £2,00, Tomatoes at £2,50, Ready meals at £ 5,00
  • Store this information using the most appropriated data structures we've studied so far
  • Have a prompt to add an item to the list (you can have two prompts for the item and its price)
  • Output a list displaying each item and its price
  • Output the total at the end

Tips

  • Pay attention to your data types, and what can you do with them

Challenge We should be able to expand the list. As such, find a way to have two prompts, one for the item and another for the price, asking you repeatedly to add items to your list. The user should be able to stop adding items and then output the list to the user. We can use Google in our favour here if we know the right questions to ask