MCPcopy Create free account
hub / github.com/SuperSimpleDev/javascript-course / saveToStorage

Function saveToStorage

2-copy-of-code/lesson-14/data/cart.js:13–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11}
12
13function saveToStorage() {
14 localStorage.setItem('cart', JSON.stringify(cart));
15}
16
17export function addToCart(productId) {
18 let matchingItem;

Callers 2

addToCartFunction · 0.70
removeFromCartFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected