javascript clear localstorage

JavaScript
window.localStorage.clear(); //clear all localstorage
window.localStorage.removeItem("my_item_key"); //remove one itemwindow.localStorage.clear(); //clear all localstorage
window.localStorage.removeItem("my_item_key"); //remove one itemlocalStorage.removeItem(key);
Source

Also in JavaScript: