about | help | code help+videos | done | prefs |
Write a method that returns the sum of the integers in the input array, excluding any 5's that appear in the array from the sum. For example: addNums({4, -3, 5, -1, 8, -11}) returns a 1, because if you exclude 5, the other numbers add up to 1. addNums([5, 5, 5, 5, 5]) → 0 addNums([1, 3, -2, -5, 6, 1]) → 4 addNums([4, -3, 5, -1, 8, -7]) → 1 ...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: 205
Copyright Nick Parlante 2017 - privacy