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:

Staci
1 months ago
Wait, we're supposed to be solving coding problems, not writing comedy skits! Although, I do have a killer 'Promise' pun up my sleeve...
upvoted 0 times
Rossana
13 hours ago
Haha, nice pun! But seriously, the answer is C) aPromise and bPromise run in parallel.
upvoted 0 times
...
Twanna
8 days ago
A) aPromise and bPromise run sequentially.
upvoted 0 times
...
Elly
10 days ago
C) aPromise and bPromise run in parallel.
upvoted 0 times
...
...
Dick
1 months ago
I'm with Deandrea on this one - the 'await' keyword had me thrown off at first. But C) is definitely the right answer here.
upvoted 0 times
Yen
8 days ago
I agree, C) aPromise and bPromise run in parallel.
upvoted 0 times
...
...
Deandrea
1 months ago
Haha, I almost went with B) until I really thought it through. Gotta love these tricky Promise questions!
upvoted 0 times
Murray
13 days ago
I know right! Promise questions can be tricky sometimes.
upvoted 0 times
...
Melissa
14 days ago
C) aPromise and bPromise run in parallel.
upvoted 0 times
...
Lemuel
1 months ago
A) aPromise and bPromise run sequentially.
upvoted 0 times
...
...
Regenia
2 months 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
Carylon
21 days ago
User2: Yeah, that's correct. They do run in parallel.
upvoted 0 times
...
Roslyn
25 days ago
User1: I think the promises run in parallel.
upvoted 0 times
...
...
Teresita
2 months 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
2 months ago
But doesn't the 'await' keyword make them run sequentially? I'm sticking with my answer.
upvoted 0 times
...
Bernardine
2 months ago
I disagree, I believe the answer is A) aPromise and bPromise run sequentially.
upvoted 0 times
...
Carlene
2 months ago
I think the answer is C) aPromise and bPromise run in parallel.
upvoted 0 times
...

Save Cancel