I had to build a list in lab 28 to which you could add objects. However, these things will not go away once the website is refreshed because the goods are stored using localStorage. In order to make this functionality, I created the addItem function that not only added the item to the list using populateList) (but also stored the items in local storage using localStorage.setItem('items', JSON.stringify(items)); the items variable would be updated using the.push(item) function in addItem. I used the innerHTML feature to show html code with javascript variables inserted in it to create the populateList function.
To exercise my javascript abilities, I did this laboratory. I discovered how to store javascript variables using the.map feature and local storage. I imagine using these skills when I create a store's cart function because the cart keeps items in the cart even when you don't visit the site, so when you come back it will show up again.
To exercise my javascript abilities, I did this laboratory. I discovered how to store javascript variables using the.map feature and local storage. I imagine using these skills when I create a store's cart function because the cart keeps items in the cart even when you don't visit the site, so when you come back it will show up again.
Comments
Post a Comment