List of questions
Related questions
Question 65 - Certified JavaScript Developer I discussion
A developer wrote the following code:
01 let X = object.value;
02
03 try {
04 handleObjectValue(X);
05 } catch (error) {
06 handleError(error);
07 }
The developer 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 ……………………
Your answer:
0 comments
Sorted by
Leave a comment first