Array.prototype.reduce() Lab

Easy
3
75.0% Acceptance

In this lab, you will learn how to use the Array.prototype.reduce() function in JavaScript to sum all the elements in a given array. You will complete this lab by creating a new function called sumArray in the reduce.js file. The sumArray function should take an input array of numbers and return the sum of all elements using the reduce() method.