Created
September 16, 2019 15:59
-
-
Save NyaGarcia/5fabb4836273b48eeb77c13f5d763593 to your computer and use it in GitHub Desktop.
Passing parameters to Math.max with spread operator
This file contains hidden or 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
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