출처:
https://hanamon.kr/javascript-%ED%98%B8%EC%9D%B4%EC%8A%A4%ED%8C%85%EC%9D%B4%EB%9E%80-hoisting/
https://velog.io/@ansfls/javascript-%ED%98%B8%EC%9D%B4%EC%8A%A4%ED%8C%85hoisting-%EC%9D%B4%EB%9E%80
https://developer.mozilla.org/ko/docs/Glossary/Hoisting
(영문)
JavaScript Hoisting refers to the process whereby the interpreter appears to move the declaration of functions, variables or classes to the top of their scope, prior to execution of the code.
Hoisting allows functions to be safely used in code before they are declared.
Variable and class declarations are also hoisted, so they too can be referenced before they are declared. Note that doing so can lead to unexpected errors, and is not generally recommended.
Note: The term hoisting is not used in any normative specification prose prior to ECMAScript® 2015 Language Specification. Hoisting was thought up as a general way of thinking about how execution contexts (specifically the creation and execution phases) work in JavaScript.
Source: https://developer.mozilla.org/en-US/docs/Glossary/Hoisting