MCQs > IT & Programming > JavaScript > How can I get sum to be the sum of this array, var arr = [0,1,2,3]?

JavaScript MCQs

How can I get sum to be the sum of this array, var arr = [0,1,2,3]?

Answer

Correct Answer: var sum = arr.reduce(function(a,b){ return a + b });

Explanation:

Note: This Question is unanswered, help us to find answer for this one

JavaScript Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

JavaScript Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it