Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Q1.
다음 설명이 옳으면 O, 틀리면 X를 고르시오.
new Promise(...)로 생성된 Promise의 초기 상태는pending이다.resolve와reject가 둘 다 호출되면, 나중에 호출된 쪽이 실제 최종 상태를 결정한다.promise.then(...)을 호출하면 항상 새로운 Promise 객체가 반환된다.then의 콜백에서 값을 그냥 반환하면, 그 값은 다음then으로 전달되지 않는다. (즉, 단순 반환은 무시된다.)Q2.
다음 코드의 실행 결과(콘솔 출력 순서)를 쓰시오.
Q3.
아래 보기 중, catch 블록이 실행되는 상황을 모두 고르시오.
서버가 200 OK로 응답했지만, JSON이 아니라 이상한 텍스트를 보내서 response.json() 하는 순간 파싱 에러가 난 경우
서버가 404 Not Found로 응답한 경우
사용자의 인터넷이 끊겨서 아예 요청을 보내지 못한 경우 (네트워크 에러)