Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 742 Bytes

File metadata and controls

21 lines (14 loc) · 742 Bytes

Advanced JavaScript Fundamentals

8. Strict mode

Lesson 8 instructor notes

Strict mode intentionally has different semantics than normal code we're used to.

Takeaways:

  • "use strict" the syntax for strict mode
  • Catches silent errors and throws them
  • Doesn't allow you to use certain syntax that could possibly be defined in future versions of ECMAScript.
  • es6 JS modules are automatically converted to strict mode
  • If the 'this' keyword ever references the global object in browser, strict mode returns undefined.
  • Doesn't allow global variables. For example:
name = ‘tyler’ // throws a reference error