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 # 34 Topic 4 Discussion

Salesforce Certified JavaScript Developer (JS-Dev-101) JavaScript-Developer-I Question # 34 Topic 4 Discussion

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

A developer wrote the following code to test a sum3 function that takes in an array of numbers and returns the sum of the first three numbers in the array. The test passes:

01 let res = sum3([1, 2, 3]);

02 console.assert(res === 6);

03

04 res = sum3([1, 2, 3, 4]);

05 console.assert(res === 6);

A different developer made changes to the behavior of sum3 to instead sum all of the numbers present in the array.

Which two results occur when running the test on the updated sum3 function?


A.

The line 02 assertion fails.


B.

The line 05 assertion passes.


C.

The line 05 assertion fails.


D.

The line 02 assertion passes.


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.