JAVASCRIPT-DEVELOPER-I Web TestEngine demo

Exit VCEDump JAVASCRIPT-DEVELOPER-I Salesforce Certified JavaScript Developer (JS-Dev-101)
Question 25 of 34
0% complete
Q25 Multiple choice

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

Select all that apply.

Sign in to mark questions

Sign in to save marked questions and return to this demo.

Sign in