My code:
var old = localStorage.getItem('GotoBeginning');
console.log("old is "+ old);
if (old===true) {
console.log("Returning true");
$("#gobeg").prop('checked', true);
return true;
} else {
console.log("Returning false");
$("#gobeg").prop('checked', false);
return false;
}
The value in localStorage for GotoBeginning is true. My console.log shows:
old is true
Returning false
I expected the following output:
old is true
Returning true