: 인터프리터가 코드를 실행하기 전에 함수, 변수, 클래스 또는 임포트(import)의 선언문을 해당 범위 맨 위로 끌어올리는 것처럼 보이는 현상
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
console.log(helloB());
console.log(helloA());
let helloA = function() { // 함수 표현식
return "안녕하세요.";
}
function helloB () { // 함수 선연식
return "안녕하세요.";
}
</script>
</body>
</html>