about | help | code help+videos | done | prefs |
collapse
This method returns a new array containing the result of replacing each pair of integers with the sum of that pair. Assume the array has an even amount of values. collapse([7, 2, 8, 9, 4, 13, 7, 1, 9, 10]) → [9, 17, 17, 8, 19] collapse([1, 2, 3, 4, 5, 6]) → [3, 7, 11] collapse([0, 0, 0, 0]) → [0, 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: 201 Post-solution available
Copyright Nick Parlante 2017 - privacy