🈯let
declares a block-scoped local variable.
JS ⟩ declaration ⟩ variable ⟩ let
(declaration) declares a local variable in block scope.
let is
not reserved word❗
雖說似乎有一個奇怪的 "for-init" scope,但裡面 let 變數的表現其實更像是 block-scoped。👉 scopes matter with closures ⟩ ❓
Last updated
Was this helpful?