strict mode
๐ง ๆฝๅทฅไธญ
Last updated
Was this helpful?
๐ง ๆฝๅทฅไธญ
Last updated
Was this helpful?
โฉ โฉ โฉ โฉ โฉ strict
always use strict mode ( see )
a way to opt in to a restricted variant of JavaScript, thereby implicitly opting-out of "sloppy mode".
in strict mode๏ผ
function in block (FiB) is local to the block.
referencing a function in block (FiB) outside the block๏ผ
sloppy mode: โ / initialized to undefined (in outer scope)
strict mode: โ (invisible in outer scope)
class / ES module always works in strict modeโ๏ธ
itHome โฉ โฉ