I've been testing some code which takes a variable in a json format and should print that, it prints an empty array however.
If I'm trying this:
console.log(JSON.stringify({first:1,second:2}));
Then I'm crashing the page (Chrome: "Aw, Snap!").
I've asked a few people, and they weren't able to reproduce it, I however get it every time. Tested it in FireFox too, and there it crashes too.
This was the code:
var timer={first:0,second:0,third:0,fourth:0};
localStorage.setItem('saveTimers', JSON.stringify(timer));
And that sets [] in the localStorage