Answer the question
In order to leave comments, you need to log in
How, after converting from a string to an object in LOCALSTORAGE, put this object into an array and after updating the page so that it is already there?
i have an array of objects
var tasks = [{
name: "Задача № 1",
selectedProject: 'select project',
dateBegin: new Date('07 24, 2016 19:58:49'),
dateFinish: new Date('07 24, 2016 19:58:59')
}, {
name: "Задача № 2",
selectedProject: 'timer',
dateBegin: new Date('07 25, 2016 19:58:30'),
dateFinish: new Date('07 25, 2016 19:59:15')
}]
localStorage.setItem("tasks", serialTask);
var serialTask = JSON.stringify(tasks);
var returnTask = JSON.parse(localStorage.getItem("tasks"));
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question