How can I save data in an array, regardless whether you restarted the code heard about localStorage
can be an example in code?
// setItem var arr = [1, 2, 3] localStorage.setItem("arr", JSON.stringify(arr)); // getItem var arr = localStorage.getItem("arr"); arr = arr ? JSON.parse(arr) : ;
This is in HTML5. Its for sites to allow customers to use storage on there computer. Setltem is while they are there once they leave the storage space is returned to the system. And getltem is storage they can use for up to a year.