From 4b93959c4f8cdf26e0129bc8131c9adff407e93a Mon Sep 17 00:00:00 2001 From: Kristyn Bryan Date: Fri, 27 May 2016 14:36:57 -0400 Subject: [PATCH] Create README.md --- unit_01/w03d02/morning_exercise/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 unit_01/w03d02/morning_exercise/README.md diff --git a/unit_01/w03d02/morning_exercise/README.md b/unit_01/w03d02/morning_exercise/README.md new file mode 100644 index 0000000..c388abd --- /dev/null +++ b/unit_01/w03d02/morning_exercise/README.md @@ -0,0 +1,17 @@ +# Morning Exercise + +With these morning exercises, we want you to think about how to, not only tackle the problem, but to see how effeciently you can solve them. Solve this one in **two** different ways. + +## The Biggest Difference + +Write a function that takes in the array and returns the **largest difference** between any **two** of its elements. You can assume that the array is all numbers and that there are no duplicates. + +The starter code: +``` javascript + var biggestDifference = function(arr){ + // code goes here... + } + + biggestDifference([1,4,7,3,2]) // would return 6 + biggestDifference([9, 20, 5, -6, -1, 8]) // would return 26 +```