Variable and function hoisting in JavaScript
JavaScript variables and functions are not declared at the point of use. Instead, they are moved to the top of their scope hoisted and assigned a default value of undefined until they're reached in code.