Created
October 4, 2019 15:47
-
-
Save ccheptea/d0d0ff15582c6b21af06a187af669f30 to your computer and use it in GitHub Desktop.
Example of how to use Array.reduce() to find the minimum integer in an array.
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
let min = [4,2,1,5,9].reduce((min, el) => Math.min(min, el)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment