List of questions
Related questions
Question 73 - Certified JavaScript Developer I discussion
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
B.
When resolved and settled
C.
When resolved
D.
When resolved or rejected
Your answer:
0 comments
Sorted by
Leave a comment first