JAVASCRIPT-DEVELOPER-I practice question 12 of 30

Refer to the code below: 01 const exec = (item, delay) =>{ 02 newPromise(resolve => setTimeout( () => resolve(item), delay)), 03 async function…

Choose your answer, then check it against the explanation.

Domain Asynchronous Programming

Refer to the code below: 01 const exec = (item, delay) =>{ 02 newPromise(resolve => setTimeout( () => resolve(item), delay)), 03 async function runParallel() { 04 Const (result1, result2, result3) = await Promise.all{ 05 [exec (‘x’, ‘100’) , exec(‘y’, 500), exec(‘z’, ‘100’)] 06 ); 07 return `parallel is done: $(result1)$(result2)$(result3)`; 08 } } } Which two statements correctly execute the runParallel () function? Choose 2 answers
Answer options
Question 12 of 30

Keep practicing

Take the free JAVASCRIPT-DEVELOPER-I practice test

Ten exam-style questions with answers and explanations, plus the exam facts and study guides.

Start the free practice test

More questions

Other JAVASCRIPT-DEVELOPER-I practice questions

Scroll to Top