about | help | code help+videos | done | prefs |
Write a method that returns the difference between the highest and lowest values in an array. If the array is empty or only contains one element, return zero. diffHighLow123([7, -4, 3, 1, 3, 5, 12, 2, 4, 1]) → 16 diffHighLow123([5]) → 0 diffHighLow123([]) → 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: 290
Copyright Nick Parlante 2017 - privacy