Skip to content
Advertisement

Tag: remember-me

How do I use localStorage to remember a user’s name

This code has been checked for errors and none were detected. But, when it runs, it alerts null. For Sololearners my code bit: https://code.sololearn.com/WOv1cF0EewdB/?ref=app Why is this?* *jQuery answers are OK Answer You are not getting a hello alert is because you are checking getItem’s return value with === true and !== true. setItem will convert your value to string,

Advertisement