about | help | code help+videos | done | prefs |
Write a method that returns only the multiples of 'mult' that appear in the array 'nums'. They should appear in the same order as in the original array 'nums'. The new array will be the same length as 'nums' with the end of the array padded in zeros. Look at the test data for examples. quiz2020_12_02_P1SLHL_selectMults([87, 43, 91], 2) → [0, 0, 0] quiz2020_12_02_P1SLHL_selectMults([46, 22, 12, 66, 120], 2) → [46, 22, 12, 66, 120] quiz2020_12_02_P1SLHL_selectMults([5, 6, 10, 21, 22, 25, 27, 85, 42, 40], 5) → [5, 10, 25, 85, 40, 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: 270
Copyright Nick Parlante 2017 - privacy