Just take a look at this javascript:
localStorage.myAwesomeItem = true;
var item = localStorage.myAwesomeItem;
alert(item);
if(item==true)
{alert("really true");}
else
{alert("lies; not true");}
jsfiddle
I installed myAwesomeItemlocal storage on true. Good. Then I save this element in a variable called item. And an alert to check its meaning. As you can see, this true.
Then I check the condition if my element is really right. But this is not so. He is going for else.
Can someone explain me this behavior?
source
share