A user named Jane wants to buy a new baby toy on an online store. She should be able to see:
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} |