about | help | code help+videos | done | prefs |
Write a method that returns the sum of all the numbers in the array 'nums', but excluding any occurrence of 'exclude'. For example, if 'nums' is {3,1,3,3,5,3,3,3} and 'exclude' is 3, you will return 6 because that is the sum of all the non-excluded numbers. Look at the test data for examples. quiz2023_09_15_SLHL_findSum([7, 124, 24, 4, 436, 352, 124, 436, 76, 3], 436) → 714 quiz2023_09_15_SLHL_findSum([5, 7, 2, 3, 10, 20, 7, 9, 1, 10, 7, 7, 7], 7) → 60 quiz2023_09_15_SLHL_findSum([], 122) → 0 ...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: 230
Copyright Nick Parlante 2017 - privacy