Skip to content

Instantly share code, notes, and snippets.

@xodhx4
Created April 2, 2020 11:29
Show Gist options
  • Save xodhx4/21a417a9cfd4f884b87ea86d460a72bb to your computer and use it in GitHub Desktop.
Save xodhx4/21a417a9cfd4f884b87ea86d460a72bb to your computer and use it in GitHub Desktop.
Markdium-JS 초보가 쓰는 async await 처음부터 이해하기
async function alertResult() {
// Blocking IO처럼 보이게 한다.
const result = await callApi(); // callApi는 async 함수이거나, promise를 리턴하는 함수다.
console.log(result); // 결과를 출력한다
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment