about | help | code help+videos | done | prefs |
sumNegatives
Define a function that when passed an array, returns the sum of all negative numbers in the array. sumNegatives([10, 70, 20, 90]) → 0 sumNegatives([-10, 70, 20, -90]) → -100 sumNegatives([-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) → -55 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 1 Post-solution available
Copyright Nick Parlante 2017 - privacy