Frontend Foxes Homework - Shopping Cart Data Types

Understanding what shopping cart is?

Example of shopping carts:

A User Story

A user named Jane wants to buy a new baby toy on an online store. She should be able to see:

A wireframe of what the user should see and experience
Fig1. A low-fidelity wireframe of a user purchasing a baby product on an online store. User should see a storefront, see variety of products being sold, ability to add item to basket, view the basket, modify basket and purchase the item. Wireframe made by myself.

Different data types in this shopping cart scenario

User Requirements Data Types Examples
A list of products on the storefront Array let products = [ 'Teether Toy', 'Walker', 'Rattles']
A more detailed description on each product to include description Object let product = { name: "Teether Toy", description: "Lorem Ipsum", price: 10}
Stock availability Boolean let isItemInStock = true
Being able to see the price Number let listedPrice = 10
Name and description of product String let toyName = "Play Kitchen"
Item waiting to be added. Add to basket button will trigger the change in number of items in cart icon. It should start with `null` Null let basketItems = Null;
Proceed to checkout button Function const proceedCheckout = function () { // this is a functionality where it should take user to another page to make payment}