Skip to content

Instantly share code, notes, and snippets.

@xodhx4
Created April 2, 2020 11:29
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 xodhx4/706e7a95a2cfa76f2509bb85c08f74c0 to your computer and use it in GitHub Desktop.
Save xodhx4/706e7a95a2cfa76f2509bb85c08f74c0 to your computer and use it in GitHub Desktop.
Markdium-JS 초보가 쓰는 async await 처음부터 이해하기
async function printResultConcurrent() {
const data = wait Promise.all([callApi1(), callApi2()]); // 둘다 동시에 기다리기 때문에 가장 긴 5초를 대기
console.log(data); // 5초 걸림
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment