JavaScript Hoisting Explained Simply
Hoisting is a JavaScript mechanism where variables and function declarations are moved to the top of their scope before code execution.
console.log(greet());
console.log(score);
function greet() {
return "Hello!";
}
var score = 7;
console.log(score); AI panel
Ask AI to clarify the parts you don’t fully understand, or go more in depth with MDN documentation.