In ECMAScript5, what's the scope of “use strict”?
问题 What scope does the strict mode pragma have in ECMAScript5? "use strict"; I'd like to do this (mainly because JSLint doesn't complain about it): "use strict"; (function () { // my stuff here... }()); But I'm not sure if that would break other code or not. I know that I can do this, which will scope the pragma to the function... (function () { "use strict"; // my stuff here... }()); but JSLint complains about it (when the "strict" JSLint option is enabled) because it thinks you're executing