[JavaScript] How to find the max number from an array?
I want to find the maximum number from an array, how can I do that in Javascript?
1 Answer
3 years ago by Jahaan
You can use Math.max()
method to find the maximum number present in a given array.
Usage:
Math.max(...array)
Try with example here : https://onecompiler.com/javascript/3xnkeqaju
3 years ago by Meera