강의

멘토링

커뮤니티

Inflearn Community Q&A

96tmdtmd4535's profile image
96tmdtmd4535

asked

Advanced Modern JavaScript (ES6+)

4. Transmitting data to the server, converting transmitted/received data

프로미스를 쓰는 이유

Written on

·

238

0

제가 헤깔리는거 같긴한데 ㅠ create함수를 프로미스로 리턴하는 이유가 비동기 환경을 만들어주기 위해선가요??..

프로미스가 없어도 xhr이 비동기로 작동되어 프로미스가 없어도 되는거 아닌가요?......

onload에

function(){

this.status === 200 ? return JSON.parse(this.response)

: return this

}

이렇게 쓰면 작동이 안되는건가요?...

xhr 은 비동기 환경에서만 작동하는 건가요?

죄송합니다..

es6javascript

Answer

This question is waiting for answers
Be the first to answer!
96tmdtmd4535's profile image
96tmdtmd4535

asked

Ask a question