Created
April 10, 2021 19:48
-
-
Save hisamparker/258063fe56bcc3bf6c7e8898fbd81a41 to your computer and use it in GitHub Desktop.
array : return max in an array of nums
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
| let arr = [3, 5, 1]; | |
| alert( Math.max(...arr) ); // 5 (spread turns array into a list of arguments) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment