Strict Mode — “use strict” – Beau teaches JavaScript

  • Post comments:8 Comments



Strict mode in JavaScript tightens the rules for certain behaviors. You can execute JavaScript code in strict mode by using the “use strict” directive.

💻 Code: http://codepen.io/beaucarnes/pen/OmJLaR?editors=00100

🔗 Resource: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode

🐦 Beau Carnes on Twitter: https://twitter.com/carnesbeau

⭐JavaScript Tutorials Playlists⭐
▶JavaScript Basics: https://www.youtube.com/playlist?list=PLWKjhJtqVAbk2qRZtWSzCIN38JC_NdhW5
▶Data Structures and Algorithms: https://www.youtube.com/playlist?list=PLWKjhJtqVAbkso-IbgiiP48n-O-JQA9PJ
▶Design Patterns: https://www.youtube.com/playlist?list=PLWKjhJtqVAbnZtkAI3BqcYxKnfWn_C704
▶ES6: https://www.youtube.com/playlist?list=PLWKjhJtqVAbljtmmeS0c-CEl2LdE-eR_F
▶Clean Code: https://www.youtube.com/playlist?list=PLWKjhJtqVAbkK24EaPurzMq0-kw5U9pJh


We’re busy people who learn to code, then practice by building projects for nonprofits. Learn Full-stack JavaScript, build a portfolio, and get great references with our open source community.

Join our community at https://freecodecamp.com
Read great tech articles at https://medium.freecodecamp.com

source

This Post Has 8 Comments

  1. Unnamed

    then ES6 came in and says: screw you use strict!
    let: don't worry guys i got you back!
    const: also got your back guys!

  2. Aprime

    Can't you use window.hello in strict mode?

  3. Kintario

    Why do JavaScript courses don't mention that it should be mandatory to use "strict mode", why do IDE don't include this mode in js files by default and in fact why do browsers even allow execution of JavaScript without strict mode??? It literally helps so much to write a good quality code

Leave a Reply