We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 115181e commit 7ce8227Copy full SHA for 7ce8227
1 file changed
1-js/06-advanced-functions/04-var/article.md
@@ -82,7 +82,7 @@ function sayHi() {
82
}
83
84
sayHi();
85
-alert(phrase); // Error: phrase is not defined
+alert(phrase); // ReferenceError: phrase is not defined
86
```
87
88
위에서 살펴본 바와 같이, `var`는 `if`, `for` 등의 코드 블록을 관통합니다. 아주 오래전의 자바스크립트에선 블록 수준 렉시컬 환경이 만들어 지지 않았기 때문입니다. `var`는 구식 자바스크립트의 잔재이죠.
@@ -231,7 +231,7 @@ IIFE는 다음과 같이 생겼습니다.
231
232
```js run
233
// 함수를 선언과 동시에 실행하려고 함
234
-function() { // <-- Error: Function statements require a function name
+function() { // <-- SyntaxError: Function statements require a function name
235
236
var message = "Hello";
237
0 commit comments