I have 2 apps working together with localstorage and I was wondering how can I delete all the keys which start with note- and todo- . I know localstorage.clear() clears ever
Object.keys(localStorage) .forEach(function(key){ if (/^todo-|^note-/.test(key)) { localStorage.removeItem(key); } });