about | help | code help+videos | done | prefs |
copyOdds
Given an array of positive ints, return a new array of length "count" containing the first odd numbers from the original array. The original array will contain at least "count" odd numbers. copyOdds([3, 2, 4, 5, 8], 2) → [3, 5] copyOdds([3, 1, 4, 5, 6, 2, 8], 3) → [3, 1, 5] copyOdds([6, 1, 2, 4, 5, 9], 3) → [1, 5, 9] ...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: 15
Copyright Nick Parlante 2017 - privacy