🔰function hoisting
identifier hoisted at top of scope, value initialized to a function value (instantly).
// function declarations can be called from the start
greeting(); // Hello!
// ⭐️ function hoisting
// ------------------------------------------------------
// • applies to "function declarations" only.
// • identifier: (function name) hoisted to top of scope.
// • value : initialized (to a function value).
// ------------------------------------------------------
function greeting() {
console.log("Hello!");
}Last updated