Skip to content

Instantly share code, notes, and snippets.

@ccheptea
Created October 4, 2019 15:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ccheptea/d0d0ff15582c6b21af06a187af669f30 to your computer and use it in GitHub Desktop.
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.
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