Pre-Summer Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: validbest

Exam JavaScript-Developer-I All Questions
Exam JavaScript-Developer-I All Questions

View all questions & answers for the JavaScript-Developer-I exam

Salesforce Developer JavaScript-Developer-I Question # 36 Topic 4 Discussion

JavaScript-Developer-I Exam Topic 4 Question 36 Discussion:
Question #: 36
Topic #: 4

Referto 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?"));

JavaScript-Developer-I Question 36

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


Get Premium JavaScript-Developer-I Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.