about | help | code help+videos | done | prefs |
Write a method that returns 'true' if ALL of the numbers in the array are the same. However, if even one number does not match the others, return 'false'. Note that an empty array or an array with just one number in it will both be considered as matching so return 'true' in those cases. oct18_2016_SLHL_allSame([]) → true oct18_2016_SLHL_allSame([4, 5, 1, 8, 2, 17, 23, 50, 2, 2]) → false oct18_2016_SLHL_allSame([7, 7, 7, 7, 7, 7, 7, 7, 7, 7]) → true ...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: 290
Copyright Nick Parlante 2017 - privacy