Lambda says"use strict" opts into stricter parsing that catches silent mistakes.
Adding "use strict" at the top of a file or function turns silent errors into thrown ones: assigning to undeclared variables, duplicate parameters, and writing to read-only properties all fail loudly. Modules and class bodies are strict automatically, so you'll often get it for free in modern code.
Power-ups you unlock
"use strict" makes silent errors throw
Blocks accidental globals from typos
Modules & classes are strict automatically
A safety net for catching mistakes early
The Mutator attacks — common mistakes
Relying on sloppy-mode behavior
Assuming a script is strict without the directive
Placing the directive after other statements (ignored)
Boss battleIn your head: in strict mode, assigning to an undeclared variable throws — why is that good?