Array Summing
Now you'll have to do some actual logic.
You'll need to remove the for loop in the sum function in order to pass the linter tests. But if you remove the for loop, the function will break and the logic test will fail.
To pass both tests at the same time, you'll have to get clever. There are quite a few ways to go about this, but I recommend either using recursion or .reduce().
Good luck!
- Waiting on logic tests...
- Waiting on linter...
Waiting on logic tests and linter...
Loading code block...
Loading editor...
Click to show solution
Loading code block...