ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 1 - Certified JavaScript Developer I discussion

Report
Export

Refer to the code below:

01 const exec = (item, delay) =>{

02 new Promise(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

A.
Async runParallel () .then(data);
Answers
A.
Async runParallel () .then(data);
B.
runParallel ( ). done(function(data){ return data;});
Answers
B.
runParallel ( ). done(function(data){ return data;});
C.
runParallel () .then(data);
Answers
C.
runParallel () .then(data);
D.
runParallel () .then(function(data) return data
Answers
D.
runParallel () .then(function(data) return data
Suggested answer: B, D
asked 23/09/2024
Vito Ranieri
44 questions
NextNext
User
Your answer:
0 comments
Sorted by

Leave a comment first