Chapter 315mChallenge
जावास्क्रिप्ट फ़ंक्शन — Challenge
पुन: प्रयोज्य कोड ब्लॉक।
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...