But what if you're targeting the browser? Is the strict mode supported?
We just transitioned our code base to "use strict". If you use it in combination with a module system it works painlessly, and indeed prevents some classes of bugs.
Re:Farewell CoffeeScript
by danabramov on Thursday October 02, 2014 @05:24AM
(#8399970)
Surely you can (and should) 'use strict' in browser.
[deleted]
Oh, yes... I did. The post you linked says it is not reliable and it shouldn't be trusted as not all browsers support it. I was asking in case you had anything to add.
Sorry for the misunderstanding.
Re:Farewell CoffeeScript
by swartkrans on Thursday October 02, 2014 @02:20PM
(#8402193)
I apologize for that comment, it was unnecessarily brusque and actually uninformed. I think it's fine to depend on "use strict"; in Chrome.
Thanks for the info. Seems like it is more reliable than the post in MDN suggests: http://caniuse.com/#feat=use-strict
So will "use strict";
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...