Sum Array

Easy1 second

Write a function that returns the sum of an array of numbers.

Examples:

Input: [1, 2, 3]
Output: 6

The sum of [1, 2, 3] is 6.

Input: [-1, 1, 0]
Output: 0

The sum of [-1, 1, 0] is 0.

Constraints:

  • • 1 ≤ array length ≤ 1000
  • • Array elements are numbers
Loading...

Custom Test InputPress Ctrl + Enter to run

Output

Loading Environment...