about | help | code help+videos | done | prefs |
FindingThe4'sArray. Write the method that accepts an array of integers (list) and returns the count of the number of occurrences of "4". Be sure to check the array for length as if it is empty, return zero fours. Example: 12345678 would return 1. findTheFoursArrays([1, 2, 3, 4, 5, 6, 7, 8]) → 1 findTheFoursArrays([4, 1, 4, 2, 4, 3, 4, 5]) → 4 findTheFoursArrays([3, 4, 3]) → 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
Difficulty: 110
Copyright Nick Parlante 2017 - privacy