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 item
Source

Also in JavaScript: