Recently, I ran some of my JavaScript code through Crockford's JSLint, and it gave the following error:     Problem at line 1 character 1: Missing "use strict" statement.   Doing some searching, I realized that some people add "use...
This code works alerts "ok" in all browsers except Chrome:  eval("var outer = 0; function test() {'use strict'; outer = 1; } test(); alert('ok');");   (Try it on jsfiddle).  All I'm doing is referencing an outer va...
//Global Scope "use strict"; //1 function A() {     "use strict"; //2     function innerA() {         "use strict"; //3     } }   I was just wondering:      Is doing use strict at //1 is enough or do we have to be explicit at...
This question already has answers here:...
According the this http://caniuse.com/use-strict 'use strict' does not support in IE version 8/9.  My question is, Is it really safe to use 'use strict' in IE 8/9 or browsers that its not compatible with? Will it break my code?...
I am defining the following function in my JavaScript:  function _snr(id) {     "use strict";     this.e = "something"; }   I ran my code through JSLint and it suggested that I add "use strict" to the function.  When I do e no...
I wonder if there is really nessesary to include the "use strict" when I am done programming and release my JavaScript document to anyone to see. I like to use it because to check that I have coded in a good way.  So, should I include or just...
I'm trying to get the "use strict"; directive to work, and having a bit of trouble.  In the following file FireFox 9 will (correctly) detect that someVar hasn't been declared on line 3, but fails to detect that theVar hasn't been...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.