Skip to content

Commit 7ce8227

Browse files
committed
c17-06 에러주석 동기화
1 parent 115181e commit 7ce8227

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

1-js/06-advanced-functions/04-var/article.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function sayHi() {
8282
}
8383

8484
sayHi();
85-
alert(phrase); // Error: phrase is not defined
85+
alert(phrase); // ReferenceError: phrase is not defined
8686
```
8787

8888
위에서 살펴본 바와 같이, `var``if`, `for` 등의 코드 블록을 관통합니다. 아주 오래전의 자바스크립트에선 블록 수준 렉시컬 환경이 만들어 지지 않았기 때문입니다. `var`는 구식 자바스크립트의 잔재이죠.
@@ -231,7 +231,7 @@ IIFE는 다음과 같이 생겼습니다.
231231

232232
```js run
233233
// 함수를 선언과 동시에 실행하려고 함
234-
function() { // <-- Error: Function statements require a function name
234+
function() { // <-- SyntaxError: Function statements require a function name
235235

236236
var message = "Hello";
237237

0 commit comments

Comments
 (0)