In localStorage how do we save similar tuples with index?

Joymnsync

New Member
In our extension, we are getting values of username( eg: Johnny123), accname (eg: Facebook).I want to store this for multiple accounts and usernames in the localStorage. We have written this code :\[code\]var i = Number(localStorage.usercounter); // counter for number of userslocalStorage.username(i) = username.value; // textbox valuelocalStorage.accname(i) = accname.value; // textbox value\[/code\]this code is not executing, what is the right way to store the values? \[code\]localStorage.username = username.value;localStorage.accname = accname.value;\[/code\]this is executing and allowing us to retrieve values. Please Help.
 
Back
Top