Salesforce JavaScript-Developer-I Question Answer
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
Salesforce JavaScript-Developer-I Summary
- Vendor: Salesforce
- Product: JavaScript-Developer-I
- Update on: Jul 29, 2025
- Questions: 219