Add resources for JavaScript strict mode (#1623)

* Update 110-javascript-strict-mode.md

* Update content/roadmaps/106-javascript/content/110-javascript-strict-mode.md

Co-authored-by: Kamran Ahmed <kamranahmed.se@gmail.com>
pull/1657/head
HS 2 years ago committed by GitHub
parent 5f2ef50721
commit 9b2ae09e43
  1. 14
      content/roadmaps/106-javascript/content/110-javascript-strict-mode.md

@ -1 +1,13 @@
# Javascript strict mode # Strict Mode
JavaScript's strict mode is a way to opt-in to a restricted variant of JavaScript, thereby implicitly opting out of "sloppy mode". Strict mode isn't just a subset: it intentionally has different semantics from regular code. Browsers not supporting strict mode will run strict mode code with different behavior from browsers that do, so don't rely on strict mode without feature-testing for support for the relevant aspects of strict mode. Strict mode code and non-strict mode code can coexist so that scripts can opt into strict mode incrementally.
Strict mode makes several changes to normal JavaScript semantics:
- Eliminates some JavaScript silent errors by changing them to throw errors.
- Fixes mistakes that make it difficult for JavaScript engines to perform optimizations: strict mode code can sometimes run faster than identical code that's not strict mode.
- Prohibits some syntax likely to be defined in future versions of ECMAScript.
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode'>Strict mode</BadgeLink>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://javascript.info/strict-mode'>Strict mode in JavaScript</BadgeLink>

Loading…
Cancel
Save