Skip to content

Strict vs Non-Strict Mode in ECMAScript

View on Twitter

💡 If you're not using ES Modules (import/export), using "use strict" is still relevant today.

👉🏼 An example of something crazy you can do in sloppy mode.

➡️ var let = 5

Read on the diff between sloppy and strict modes:

In non-strict mode you can use a reserved keyword such as let as a variable name. In strict mode the JavaScript compiler throws a SyntaxError.
You might also like
Find DigitalOcean Region With Lowest Ping Read tip
Use Systemd to Manage Processes Read tip
Large Node.js Project Example to Learn From Read tip