Why Do We Need Strict Mode in JavaScript?
If you have been in the Web Tech space for some time, you are most likely familiar with the banter JavaScript gets. It seems to be the most ‘mocked’ programming language yet a lot of people use it. The reason for this banter is not far-fetched, in many ways JavaScript can be surprising. Some actions that will break programs in other programming languages will run successfully in JavaScript. For example, every programming language has reserved words that should not be used as variable names and should not be overridden. An example is the undefined keyword in JavaScript, it’s a reserved keyword but the following code snippet will run without error in JavaScript: ...