Hoisting is a JavaScript behavior where variable and function declarations are moved to the top of their containing scope during compilation, allowing them to be used before they are actually declared.
console.log(a); // undefined
var a = 5;