📜  返回最小值的 js 数学函数 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:27.290000             🧑  作者: Mango

代码示例1
console.log(Math.min(2, 3, 1));
// expected output: 1

console.log(Math.min(-2, -3, -1));
// expected output: -3

const array1 = [2, 3, 1];

console.log(Math.min(...array1));
// expected output: 1