Chapter 315mChallenge
JavaScript Functions — Challenge
Reusable blocks of code.
Sum of Array
mediumSum of Array
Given const nums = [1, 2, 3, 4, 5], print the sum of all numbers using .reduce().
Expected Output
text
15Test cases (1)
1 · outputs 15
expected: 15
javascript
Loading editor...