
WTF is strict mode?
You might have seen your colleagues dropping in ‘use strict’ into their JavaScript code and wondered: WTF does that do? Another place you’ll often see use strict in place is within libraries and shared code on somewhere like GitHub. Strict mode is an opt-in way for developers to follow a restricted set of JavaScript. One reason developers might use strict mode is because it allows for greater optimisation by the browser. Using strict mode means that the browser has to make less judgement calls about what is and is not possible this means that the browser can take short cuts when it comes to interpreting your code because it knows you’ve followed a stricter standard. ...


