about | help | code help+videos | done | prefs |
Write a method that returns the number of EVEN numbers contained in the 'nums' array. For example, if 'nums' contains {71,53,58,-32,0,72,60} you would return 5 since 58, -32, 0, 72, and 60 are all even numbers, but the other elements of the array are NOT even. Look at the test data for additional examples. quiz2023_12_13_APP1SLHL_countEvens([]) → 0 quiz2023_12_13_APP1SLHL_countEvens([7]) → 0 quiz2023_12_13_APP1SLHL_countEvens([5, 20, 53, 236, 57, 3, -77, 568, -80, 4, -4, 1, -1, 3425, 45, 768, 214, 79, -455, 62346]) → 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: 230
Copyright Nick Parlante 2017 - privacy