@vithika wrote:
I have stored data in local storage,with key and values,
key is account name..
When a user creates a new account ,i want to put a check if the same key exists or not ..how should i achieve this,if the same key exists,then alert should be created else not..
I tried using the get item function ,but everytime it returns null,wheteer or not the key exists..
if(localstorage.getItem(this.account.value.name)===null) { alert } else.. { }
this does not works for me...
Posts: 3
Participants: 2