js get the maximum value of the array minimum max, min
Click to view the content of the article.
- Array sorting to get the first and last minimum values.
- MathThe function is Math.min (), Math.max (), and the array length is too long. Maximum call stack size exceeded
- Traverse the array, define the variable a equal to the first value, traverse the array with each element, each time the maximum assignment to a; traverse the completion of a is the maximum value. The minimum value is the same.