items
simpleCart.quantity()
returns:
- The total number of items in the cart, or the sum of the quantities of each unique item in the cart.
simpleCart.add({ name: "Coffee Mug", price: 4, quantity: 1 }); simpleCart.add({ name: "T-Shirt", price: 10, quantity: 2 }) simpleCart.quantity(); // 3
Comments
- There are no comments for this entry yet.