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 +```