about | help | code help+videos | done | prefs |
subtract1fromEach
Loop through an integer array subtracting one from each element. Return the resulting array. The array may be of any length including 0. subtract1fromEach([7, 7, 3]) → [6, 6, 2] subtract1fromEach([]) → [] subtract1fromEach([2]) → [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
Copyright Nick Parlante 2017 - privacy