I have an array stored in localStorage. When a button is clicked, I would like the item in the array to be removed and again saved into localStorage. Here's what I mean.
var greetings = ["Hello", "Hi", "Sup", "Hey"]
localStorage.setItem("greetings", JSON.stringify(greetings))
function remove() {
//remove "hi" How do I do this?
}
<button onclick="remove()">Remove</button>