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.