Deviopath › JavaScript

Sum of an Array

Easy · Arrays

Write a function sumArray that returns the sum of all numbers in the array. An empty array sums to 0.

Next: Keep Even Numbers