Answers for "clear the local storage item is not empty"

12

javascript localStorage clear items

localStorage.clear();//this clears the localStorage completely
Posted by: Guest on April-01-2020
0

Check if local storage is used or empty

if (localStorage.length > 0){
    //Items are stored in local storage
}else{
    //Local storage is empty
}
Posted by: Guest on August-17-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language