how to j ow i a propery exists in session storage 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');
}