Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Exam Javascript Developer I Topic 9 Question 56 Discussion

Actual exam question for Salesforce's Javascript Developer I exam
Question #: 56
Topic #: 9
[All Javascript Developer I Questions]

Refer to the code below:

Const resolveAfterMilliseconds = (ms) => Promise.resolve (

setTimeout ((=> console.log(ms), ms ));

Const aPromise = await resolveAfterMilliseconds(500);

Const bPromise = await resolveAfterMilliseconds(500);

Await aPromise, wait bPromise;

What is the result of running line 05?

Show Suggested Answer Hide Answer
Suggested Answer: C

Contribute your Thoughts:

Regenia
13 days ago
Hmm, I'm a bit confused. I thought the code would run the promises sequentially, but C) makes sense. Time to review my async/await knowledge!
upvoted 0 times
...
Teresita
14 days ago
This is a tricky one! The correct answer is C) - aPromise and bPromise run in parallel. I think the key is understanding how async/await works with Promises.
upvoted 0 times
...
Carlene
17 days ago
But doesn't the 'await' keyword make them run sequentially? I'm sticking with my answer.
upvoted 0 times
...
Bernardine
18 days ago
I disagree, I believe the answer is A) aPromise and bPromise run sequentially.
upvoted 0 times
...
Carlene
27 days ago
I think the answer is C) aPromise and bPromise run in parallel.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77