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

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

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

A developer wrote the following code:

01 let X = object.value;

02

03 try {

04 handleObjectValue(X);

05 } catch (error) {

06 handleError(error);

07 }

Thedeveloper has a getNextValue function to execute after handleObjectValue(), but

does not want to execute getNextValue() if an error occurs.

How can the developer change the code to ensure this behavior?


A.

03 try{04 handleObjectValue(x);05 }catch(error){06 handleError(error);07 } then {08 getNextValue();09 }


B.

03 try{04 handleObjectValue(x);05 } catch(error){06 handleError(error);07 } finally {08 getNextValue();10 }


C.

03 try{04 handleObjectValue(x);05 } catch(error){06 handleError(error);07 }08 getNextValue();


D.

03 try {04 handleObjectValue(x)05 ……………………


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.