๐ŸŒŽ
web.dev
Ctrlk
  • ๐ŸŒweb.dev
  • โš™๏ธtools
  • ๐Ÿ”ฐHTML
  • ๐Ÿ”ฐCSS
  • ๐Ÿ’JS
    • ๐Ÿ’กtips
    • ๐Ÿงštechnique
    • โญfeature
    • ๐Ÿ”ฐconcept
      • ๐Ÿ”ฐexecution context
      • ๐Ÿ”ฐcontext
      • ๐Ÿ”ฐenvironment
        • โš™๏ธJS engine
          • ๐Ÿ”ฐmode
            • ๐Ÿ›ก๏ธstrict mode
              • ๐Ÿ›ก๏ธeval has its own scope in strict mode
              • โœ…always use strict mode
            • โ—sloppy mode
            • โš–๏ธstrict vs. sloppy
          • ๐Ÿ”ฐv8
        • ๐Ÿ”ฐNode.js
      • ๐Ÿ”ฐassociated array
      • ๐Ÿ”ฐparser
    • ๐Ÿ”ฐcompilation
    • ๐Ÿ”ฐgrammar
    • ๐Ÿ”ฐscope
    • ๐Ÿ’value
    • ๐Ÿ”ฐvariable
    • ๐Ÿ”ฐmodule
    • ๐Ÿ”ฐiteration
    • ๐Ÿ”ฐasync code
    • ๐Ÿ”ฐdebugging
    • โ›”Error
    • ๐Ÿ›๏ธLibraries
    • ๐Ÿ› ๏ธtools
    • โœจexamples
    • ๐Ÿ’ผprojects
  • ๐Ÿ”ฐweb component
  • ๐ŸŒbrowser
  • ๐Ÿ”ฐReact
  • Server
  • ๐Ÿ”–้™„้Œ„
    • ๐Ÿ‘”custom
    • ๐Ÿงฉthree.js
    • ๐Ÿ…ฐ๏ธGoogle Apps Script
    • ๐Ÿ“–JSDoc
    • ๐Ÿ“ฆdata structure
    • ๐Ÿ”ฐalgorithm
    • ๐Ÿ”ฐparadigm
    • ๐Ÿ”ฐTypeScript
    • ๐Ÿ’Žresource
Powered by GitBook
On this page

Was this helpful?

  1. ๐Ÿ’JS
  2. ๐Ÿ”ฐconcept
  3. ๐Ÿ”ฐenvironment
  4. โš™๏ธJS engine
  5. ๐Ÿ”ฐmode
  6. ๐Ÿ›ก๏ธstrict mode

โœ…always use strict mode

it's best practice to use "strict mode".

JS โŸฉ concepts โŸฉ strict mode โŸฉ always use strict mode

in strict mode๏ผš

  • โœ…eval has its own scope in strict mode.

  • โœ… no accidental global variable in sloppy modeโ—๏ธ

  • โœ… no deplicate parametersโ—. ( ๐Ÿ‘‰ more ... )

  • โœ… can't delete variables/functions. ( ๐Ÿ‘‰ more ... )

  • โœ… no octal literals ( ๐Ÿ‘‰ more ... )

  • parameter

  • eval

  • global variable

  • Strict mode

Previouseval has its own scope in strict modeNextsloppy mode

Last updated 3 years ago

Was this helpful?