js get the maximum value in the array

const numbers = [5, 12, 8, 23, 6];
const maxValue = Math.max(...numbers);

console.log("数组中的最大值是:" + maxValue);

Guess you like

Origin blog.csdn.net/qq_44063746/article/details/132165213
Recommended