My initial thoughts were to:
- Create an empty array and assign it to “cart” variable
- Create an “item” class and use items from an inventory list to create instances of the “item” class
- Create for loop to append objects to cart array
- Append cart to div in HTML
My question is, what is the best way to create a shopping cart? Your feedback would be appreciated. Thanks.