Weekend Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: xmasmnth

A developer needs to test this function:01const sum3 = (arr) => (02if (!arr.

A developer needs to test this function:

01const sum3 = (arr) => (

02if (!arr.length) return 0,

03if (arr.length === 1) return arr[0],

04if (arr.length === 2) return arr[0]+ arr[1],

05 return arr[0] + arr[1] + arr[2],

06 );

Which two assert statements are valid tests for the function?

Choose 2 answers

A.

console.assert(sum3(1, ‘2’)) == 12);

B.

console.assert(sum3(0)) == 0);

C.

console.assert(sum3(-3, 2 )) == -1);

D.

console.assert(sum3(‘hello’, 2, 3, 4)) === NaN);

Salesforce JavaScript-Developer-I Summary

  • Vendor: Salesforce
  • Product: JavaScript-Developer-I
  • Update on: Jul 29, 2025
  • Questions: 219
Price: $52.5  $149.99
Buy Now JavaScript-Developer-I PDF + Testing Engine Pack

Payments We Accept

Your purchase with ExamsVCE is safe and fast. Your products will be available for immediate download after your payment has been received.
The ExamsVCE website is protected by 256-bit SSL from McAfee, the leader in online security.

examsvce payment method