ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 73 - Certified JavaScript Developer I discussion

Report
Export

Refer to the code below:

new Promise((resolve, reject) => {

const fraction = Math.random();

if( fraction >0.5) reject("fraction > 0.5, " + fraction);

resolve(fraction);

})

.then(() =>console.log("resolved"))

.catch((error) => console.error(error))

.finally(() => console.log(" when am I called?"));

When does Promise.finally on line 08 get called?

A.
When rejected
Answers
A.
When rejected
B.
When resolved and settled
Answers
B.
When resolved and settled
C.
When resolved
Answers
C.
When resolved
D.
When resolved or rejected
Answers
D.
When resolved or rejected
Suggested answer: D
asked 23/09/2024
Garvey Butler
44 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first