The “strict mode” pragma
The strict operating context is (go on, guess) more strict, by throwing exceptions under stricter guidelines and by preventing certain actions.
How to use it
Why use it
All it does it enforce good practices, here are a few examples:
Duplicate properties become a thing of the past. A syntax exception will be thrown if you attempt to declare a duplicate.
The “with” statement
Forget it (if you ever knew about it). It’s bad practice and the strict operating context abolishes it, it will throw a syntax exception.
You must always declare your variables before assigning them. This is good practice anyway and should always be done to prevent random global variables that can be accessed in any scope.
A note on browsers
Let’s end on a laugh
The strict operating context won’t spoil your fun running this: