how to check if browser storage key exists code example
Example: check if localstorage key exists js
if("user" in localStorage){
alert('yes');
} else {
alert('no');
}
if("user" in localStorage){
alert('yes');
} else {
alert('no');
}