🔰variable hoisting
🚧 施工中
JS ⟩ scope ⟩ hoisting ⟩ variable hoisting
identifier: hoisted to the top of its enclosing function scope. ( 👉 var has no block scope❗️❗)
identifier: hoisted to the top of its scope.
value: uninitialized❗(referencing it before init causes ReferenceError)
in the same scope, function hoisting has higher priority over variable hoisting. ( 👉 function hoisting first❗️❗)
Last updated