JAVASCRIPT-DEVELOPER-I Web TestEngine demo

Exit VCEDump JAVASCRIPT-DEVELOPER-I Salesforce Certified JavaScript Developer (JS-Dev-101)
Question 32 of 34
0% complete
Q32 Single choice

A developer is required to write a function that calculates the sum of elements in an array but is getting undefinedevery time the code is executed. The developer needs to find what is missing in the code below.

Const sumFunction = arr => {

Return arr.reduce((result, current) => {

//

Result += current;

//

), 10);

);

Which option makes the code work as expected?

Sign in to mark questions

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

Sign in