JavaScript Strict Mode

Posted: May 03, 2013 Comments

View http://javascriptweblog.wordpress.com/2011/05/03/javascript-strict-mode/

If you’ve taken a look at any of the libraries, plugins, or frameworks you’ve been using you’ve likely noticed 'use strict' somewhere near the top of many files. I must have glazed over it a dozen times before bothering to find out just what the heck it was doing there and what it did. I was pleasantly surprised at the results.

JavaScript has undergone a massive maturity phase for some time now, and this helps to propel that status. Many of us have come to embrace JSLint or JSHint as part of our workflow so as to take our code beyond simple syntax validation. Tools like these help us to programmatically enforce best practices (as determined by our config files) as our build systems run. That’s all well and good, but by nature JavaScript is a bit quirky. Strict Mode brings some additional rules when it comes to the client browser processing the code. This is a good thing and will help us to be that much more standardized in our development.

Get my newsletter

Receive periodic updates right in the mail!

  • This field is for validation purposes and should be left unchanged.

Leave a Reply

Your email address will not be published. Required fields are marked *