ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 131 - Certified JavaScript Developer I discussion

Report
Export

Refer to the code below:

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?

A.
aPromise and bPromise run sequentially.
Answers
A.
aPromise and bPromise run sequentially.
B.
Neither aPromise or bPromise runs.
Answers
B.
Neither aPromise or bPromise runs.
C.
aPromise and bPromise run in parallel.
Answers
C.
aPromise and bPromise run in parallel.
D.
Only aPromise runs.
Answers
D.
Only aPromise runs.
Suggested answer: B
asked 23/09/2024
Lucie Loisel
39 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first