See the Pen 자바스크립트 Hoisting by nilgi (@nilgi) on CodePen. 자바스크립트 Hoisting Hoisting is JavaScript's default behavior of moving all declarations to the top of the current scope (to the top of the current script or the current function). 변수는 맨 위에 선언. 오류 방지를 위에 항상 시작 부분은 모든 변수를 선언한다. 자바스크립트의 기본 규칙입니다.