I’m reading the John Resig blog about the Strict Mode in javascript, but i have a question.
One of the features of Strict Mode, is the use of JSON.parse and JSON.stringify, but i can use it WITHOUT “use strict”.
If you write the same example that he’s using on his blog:
var str = JSON.stringify({ name: "John" });
// Prints {"name":"John"}
alert( str );
You can see this working.
Why this is allowed? Am i missing something?
Thanks!
You should read this as:
Not as “JSON support, after enabling Strict mode”.
See MDN: Strict mode for more information on this topic.