Skip to content

Instantly share code, notes, and snippets.

@pihamchi
Created June 16, 2022 07:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pihamchi/252f471ee161c010b77325cf315b1012 to your computer and use it in GitHub Desktop.
Save pihamchi/252f471ee161c010b77325cf315b1012 to your computer and use it in GitHub Desktop.
async/await 에 대한 필요성을 굳이 마련하기 위한 자리 입니다.
/*
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