Answers for "parallel and sequential implementation with asyn await javascript"

0

parallel and sequential implementation with asyn await javascript

async function oneByOne() {
   const number1 = await printNumber1();
   const number2 = await printNumber2();
} 
//Output: Number1 is done, Number2 is done
Posted by: Guest on October-23-2021
0

parallel and sequential implementation with asyn await javascript

async function inParallel() {
   const promise1 = printNumber1();
   const promise2 = printNumber2();
   const number1 = await promise1;
   const number2 = await promise2;
}
//Output: Number2 is done, Number1 is done
Posted by: Guest on October-23-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language