
Hoisting is JavaScript's behavior of moving declarations to the top of their scope before code runs. Function declarations are fully hoisted — you can call them before they appear in the code. var declarations are hoisted but not their values. let and const are not usable before declaration — accessing them throws a ReferenceError.
Reference:
TaskLoco™ — The Sticky Note GOAT