Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Code review reflection
* add sections.json file to avoid test crashes

* Code review first reflection
  • Loading branch information
ss-won committed Sep 20, 2020
commit b6e0e661801c99a1c504fa625e34b916d49ff7cd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// null 또는 undefined인 코드에 도달했을 때
// 즉시 중지할 수 있는 코드를 작성할 수 있습니다.

// 프로퍼티 접근(Property Access)
// 프로퍼티 접근 (Property Access)

// 우리가 아티스트와 아티스트 약력이 없는
// 앨범을 가지고 있다고 가정해 보겠습니다. 예를 들면,
Expand All @@ -32,13 +32,13 @@ const artistBio = album?.artist?.bio;
const maybeArtistBio = album.artist && album.artist.bio;

// 이 경우 ?.는 &&과는 다르게 동작합니다. 왜냐하면,
// &&는 "falsy"값에 대한 동작이 다르기 때문입니다.
// &&는 "falsy" 값에 대한 동작이 다르기 때문입니다.
// (예. 빈 문자열, 0, NaN, 그리고, false).

// 선택적 체이닝은 null이거나, 연산을 멈추고 undefined를 반환하는
// 신호로 사용됩니다.
// 선택적 체이닝은 null이거나 undefined이면
// 동작을 멈추고, undefined를 반환합니다.

// 선택적 요소 접근(Optional Element Access)
// 선택적 요소 접근 (Optional Element Access)

// 프로퍼티 접근은 .연산자만을 이용하고,
// 선택적 체이닝이 요소에 접근할 때는 []연산자와 함께 이용합니다.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
//// { order: 1, target: "es5" }

// 최신 JavaScript는 특별한 기능이 있는
// 모던 JavaScript는 특별한 구문의
// 프로미스(Promise) 기반 API를 추가하여
// 비동기 코드가 동기적으로 작동하는 것처럼
// 콜백을 처리하는 방법을 추가했습니다.

// 모든 언어 기능과 마찬가지로, 이러한 방식은 복잡성이 증가하는 대신 효율성이
// 증가합니다: 함수를 async로 만드는 것은 반환값을 프로미스 형태로
// 감싸주는 것을 의미합니다. 기존에는 문자열을 반환했지만
// 감싸주는 것을 의미합니다. 기존에는 string을 반환했지만
// 이제 Promise<string>을 반환합니다.

const func = () => ":wave:";
Expand All @@ -18,7 +18,7 @@ const myPromiseString = asyncFunc();

myString.length;

// myPromiseString은 문자열이 아닌 프로미스 입니다:
// myPromiseString은 string이 아닌 프로미스 입니다:

myPromiseString.length;

Expand Down Expand Up @@ -57,7 +57,7 @@ const asyncFunctionCatching = async () => {
};

// 단일 값을 반환하거나 오류를 발생시키는
// API의 인체 공학적 특성 때문에,
// API의 인간 공학적 특성 때문에,
// 반환 값 내부의 결괏값에 대한 정보 제공을 고려해야 하며,
// 실제 예외적인 상황이 발생했을 때만
// throw 문을 사용해야 합니다.
Expand Down Expand Up @@ -97,7 +97,7 @@ const checkSquareRoot = async (value: number) => {
// })
// })

// 이를 선형적인 형태로 작성하면:
// 이를 순차적으로 작성하면:

// const response = await getResponse(url)
// const secondResponse = await getResponse(response.url)
Expand Down
2 changes: 1 addition & 1 deletion packages/playground-examples/copy/ko/sections.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@
"New TS Features",
"New Checks"
]
}
}