how to unset localstorage key code example Example: localstorage clear item localStorage.removeItem(key);