SyntaxFix
Write A Post
Hire A Developer
Questions
Use 'this' keyword to access variable. This worked for me
var uemail = localStorage.getItem("useremail"); if (typeof this.uemail === "undefined") { alert('undefined'); } else { alert('defined'); }