Last active
December 10, 2021 11:12
-
-
Save danielchikaka/b35645dbe2462e5db85a99114ba6e984 to your computer and use it in GitHub Desktop.
Finding the maximum number in array
This file contains 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 = [6, 89, 3, 45]; | |
let maximus = Math.max.apply(null, arr); | |
// Oh, even better | |
let maximus = Math.max(...arr) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment