Dev1.developer
Dev1.developer

Reputation: 29

Working with localstorage

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

Answers (1)

Joseph Marikle
Joseph Marikle

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

Related Questions