Skip to content

Instantly share code, notes, and snippets.

@NyaGarcia
Created September 16, 2019 15:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NyaGarcia/5fabb4836273b48eeb77c13f5d763593 to your computer and use it in GitHub Desktop.
Save NyaGarcia/5fabb4836273b48eeb77c13f5d763593 to your computer and use it in GitHub Desktop.
Passing parameters to Math.max with spread operator
const numbers = [1, 4, 5, 6, 9, 2, 3, 4, 5, 6];
const max = Math.max(...numbers);
console.log(max); //Result: 9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment