Reputation: 29
I am building an online os and have an issue. Is it possible to add data to the current values of the local storage object without removing the current values?
Upvotes: 0
Views: 386
Reputation: 78520
Kind of. All local storage variables (as far as I know. correct me if I'm wrong) are stored as strings. So "adding" a bit of data to a local storage variable could be done by appending it to the existing value. e.g.
localStorage["myHandle"] += "blah";
Upvotes: 5