JavaScript: Get Max/Min Value of Array

By Xah Lee. Date: . Last updated: .

Get max:

Math.max(...myArray)

Get min:

Math.min(...myArray)

[see Spread Operator]

[see Math]

JS in Depth
XAH  BUY NOW