Created
June 16, 2022 07:35
-
-
Save pihamchi/252f471ee161c010b77325cf315b1012 to your computer and use it in GitHub Desktop.
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
/* | |
function 사용자이름정보출력하기() { // | |
var user = 사용자id로정보조회(api); | |
if (user.id === 1) { | |
console.log(user.name); | |
} | |
} | |
*/ | |
async function 사용자이름정보출력하기() { | |
var user = await 사용자id로정보조회(api); | |
if (user.id === 1) { | |
console.log(user.name); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment