+ 7
To store
localStorage.setItem(key, value);
To access:
localStorage.getItem(key);
To remove:
localStorage.remove(key)
+ 3
Also, to clear all:
localStorage.clear();
+ 3
Arjun Dawande
As you want to store users data in localStorage so here value will be users data and key will be each unique user for example.
There are 2 users Arjun and AJ so data will be store like:
localStorage.setItem('arjun', '1233')
localStorage.setItem('aj', '1233')
So now you can access each users data by using key 'arjun' or 'aj'
Remember value can be same but keys should be uniques.