❗function hoisting first❗️
function hoisting has "higher" priority over variable hoisting.
Last updated
Was this helpful?
function hoisting has "higher" priority over variable hoisting.
Last updated
Was this helpful?
Was this helpful?
JS ⟩ scope ⟩ hoisting ⟩ function hoisting ⟩ first
in the same scope, function hoisting has higher priority over variable hoisting.
replit:function hoisting first
const { log } = console;
// <---- greeting === a "function" (at first)
// ⭐️ var hoisting has "lower" priority
var greeting; // ignored❗ (function hoisting first)
// ⭐️ function hoisting has "higher" priority
function greeting() {
console.log("Hello!"