Hoisting is JavaScript’s default behavior of moving variable and function declarations to the top of their scope before execution.
Variables declared with var are hoisted but initialized with undefined, meaning you can reference them before declaration, but they won't hold their actual value until the assignment line is executed.
let and const variables are hoisted but not initialized, so accessing them before declaration results in a ReferenceError.
Function declarations are fully hoisted, meaning they can be called before being defined.