'use strict'
I have worked in Node codebases every day for the last couple of years. One of the statements you see littered throughout files is 'use strict'. One of the purposes of this blog is for me to highlight the areas that I have always assumed without questioning. 'use script' enables a mode called "Strict Mode." This mode has been developed by the ECMAScript5 specification. It essentially serves to put additional security and clear syntax measures in front of your code. I'll go through a couple examples of what 'use strict' changes Restricting undeclared variables If I use 'use strict' in a js file and do not declare a variable, I will get an error: No More Implied Global Variables OOB Js allows for Global Variables - meaning you can declare a variable in one file and use it in another without properly instantiating as a new object in the second file. This just makes proper prototypal inheritance cleaner. Fail Loud, Fail ...