Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #parallel #sequential #implementation #asyn #await #javascript
ADD COMMENT
Topic
Name
1+8 =