Created
January 25, 2018 13:39
-
-
Save droid001/00f01381e72f7aab3ef63f293a4b5652 to your computer and use it in GitHub Desktop.
Largest number in array using .reduce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return arr.reduce(function(acc, curr) { | |
return acc > curr ? acc : curr; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment