[문서] C17 충돌 과제 해결#1863
Conversation
|
@meanzzi 리뷰 부탁드립니다 |
meanzzi
left a comment
There was a problem hiding this comment.
제가 submit review를 안눌렀었네요.. 죄송합니다 ㅠㅠ 여기 부분 확인부탁드릴게요!
| *!* | ||
| // all shooters show 10 instead of their numbers 0, 1, 2, 3... | ||
| army[0](); // 10 from the shooter number 0 | ||
| army[1](); // 10 from the shooter number 1 |
|
|
||
| 위에서 살펴본 바와 같이, `var`는 `if`, `for` 등의 코드 블록을 관통합니다. 아주 오래전의 자바스크립트에선 블록 수준 렉시컬 환경이 만들어 지지 않았기 때문입니다. `var`는 구식 자바스크립트의 잔재이죠. | ||
| ======= | ||
| alert(phrase); // ReferenceError: phrase is not defined |
There was a problem hiding this comment.
주석에 ReferenceError대신 Error가 사용된 것 같습니다!
|
|
||
| ```js run | ||
| // Tries to declare and immediately call a function | ||
| function() { // <-- SyntaxError: Function statements require a function name |
| <<<<<<< HEAD | ||
| 전역 객체의 이름을 `globalThis`로 표준화하자는 내용이 최근에 자바스크립트 명세에 추가되었기 때문에 모든 호스트 환경이 이를 따라야 하죠. Chromium 기반이 아닌 몇몇 브라우저는 아직 `globalThis`를 지원하진 않지만, 이에 대한 폴리필(polyfill)을 쉽게 만들 수 있습니다. | ||
| ======= | ||
| Recently, `globalThis` was added to the language, as a standardized name for a global object, that should be supported across all environments. It's supported in all major browsers. |
| - [모듈](info:modules)을 사용하고 있지 않다면, 브라우저에서 `var`로 선언한 전역 변수는 전역 객체의 프로퍼티가 됩니다. | ||
| - 이해하기 쉽고 요구사항 변경에 쉽게 대응할 수 있는 코드를 구현하려면, `window.x`처럼 전역 객체의 프로퍼티에 직접 접근합시다. | ||
| ======= | ||
| ...But more often is referred by "old-school" environment-specific names, such as `window` (browser) and `global` (Node.js). |
|
Please make the requested changes. After it, add a comment "/done". |
|
Please make the requested changes. After it, add a comment "/done". |
2 similar comments
|
Please make the requested changes. After it, add a comment "/done". |
|
Please make the requested changes. After it, add a comment "/done". |
|
|
||
| sayHi(); | ||
| <<<<<<< HEAD | ||
| alert(phrase); // Error: phrase is not defined |
There was a problem hiding this comment.
여기 부분 alert(phrase); // ReferenceError: phrase is not defined 로 되어야할것 같아요!
|
|
||
| ```js run | ||
| // 함수를 선언과 동시에 실행하려고 함 | ||
| function() { // <-- Error: Function statements require a function name |
There was a problem hiding this comment.
여기도 function() { // <-- SyntaxError: Function statements require a function name 이렇게 해주셔야 할 것 같아요..!
There was a problem hiding this comment.
앗 감사합니다 제가 리드미에서 에러주석은 한국어로 번역을 안한다는걸 다르게 이해를 했었네요..
반영했습니다. (5e5810)
|
/done |
요약
c17 영문 문서 동기화 충돌을 해결하고 누락된 번역 추가하였습니다.
1-js/06-advanced-functions/03-closure/10-make-army/task.md
1-js/06-advanced-functions/03-closure/5-function-in-if/task.md
1-js/06-advanced-functions/03-closure/7-let-scope/solution.md
1-js/06-advanced-functions/03-closure/article.md
1-js/06-advanced-functions/04-var/article.md
1-js/06-advanced-functions/05-global-object/article.md
1-js/06-advanced-functions/06-function-object/5-sum-many-brackets/solution.md
1-js/06-advanced-functions/06-function-object/article.md
연관 이슈
Pull Request 체크리스트
TODO