Answers for "javascript store date in localstorage"

0

javascript store date in localstorage

var a = new Date();
localStorage.setItem("a",a);
var b = new Date(localStorage.getItem("a")); 

//b now equals a (you have stored and retreived a date in localStorage)
Posted by: Guest on June-10-2021

Code answers related to "javascript store date in localstorage"

Code answers related to "Javascript"

Browse Popular Code Answers by Language