ExamGecko
Ask Question

Salesforce Certified JavaScript Developer I Practice Test 1

Add to Whishlist
00:00:00
Show Answer
Report Issue   Restart test

Question 1 / 40

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

Async runParallel () .then(data);
Async runParallel () .then(data);
runParallel ( ). done(function(data){ return data;});
runParallel ( ). done(function(data){ return data;});
runParallel () .then(data);
runParallel () .then(data);
runParallel () .then(function(data) return data
runParallel () .then(function(data) return data
Comment (0)
Suggested answer: B, D
asked 23/09/2024
Vito Ranieri
52 questions