Answers for "check if there is data in localstorage"

0

check if there is data in localstorage

if (localStorage.getItem('ID') !== null) {
    console.log(` exists`);
} else {
    console.log(`not found`);
}
Posted by: Guest on September-08-2021

Code answers related to "check if there is data in localstorage"

Code answers related to "Javascript"

Browse Popular Code Answers by Language