You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Kristyn Bryan 4b93959c4f
Create README.md
10 years ago
..
.gitkeep setup 10 years ago
README.md Create README.md 10 years ago

README.md

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:

  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