Skip to content

Instantly share code, notes, and snippets.

@RecuencoJones
Created July 4, 2018 04:51
Show Gist options
  • Save RecuencoJones/25ba6a079ccb220aade11eb1ffc0eb69 to your computer and use it in GitHub Desktop.
Save RecuencoJones/25ba6a079ccb220aade11eb1ffc0eb69 to your computer and use it in GitHub Desktop.
Math.min()
const min = (...args) => args.reduce((min, next) => min < next ? min : next, Infinity)
min() === Infinity
min(2) === 2
min(5, -3, 0) === 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment