localstorage remove multiple items code example
Example: local storage remove multiple items
//You could just put the keys to remove in an array and loop over them:
let keysToRemove = ["summaryForm", "projectForm"];
for (key of keysToRemove) {
localStorage.removeItem(key);
}
//Using a full loop, or, using forEach:
keysToRemove.forEach(k =>
localStorage.removeItem(k))
//Or use localStorage.clear() if you want to just clear everything.