Created
April 2, 2020 11:29
-
-
Save xodhx4/464f2dc6d9951c67576a9b92e666ccff to your computer and use it in GitHub Desktop.
Markdium-JS 초보가 쓰는 async await 처음부터 이해하기
This file contains 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
async function returnResult() { // Promise를 리턴 | |
const result = await callApi(); | |
return result + 10; | |
} | |
function returnResult() { // Promise를 리턴 | |
return callApi() | |
.then(function(result) { | |
return result + 10 | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment