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

Salesforce Certified JavaScript Developer (JS-Dev-101) JavaScript-Developer-I Question # 11 Topic 2 Discussion

Salesforce Certified JavaScript Developer (JS-Dev-101) JavaScript-Developer-I Question # 11 Topic 2 Discussion

JavaScript-Developer-I Exam Topic 2 Question 11 Discussion:
Question #: 11
Topic #: 2

Refer to the code below:

01 new Promise((resolve, reject) = > {

02 const fraction = Math.random();

03 if (fraction > 0.5) reject( ' fraction > 0.5, ' + fraction);

04 resolve(fraction);

05 })

06 .then(() = > console.log( ' resolved ' ))

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

08 .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


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.