主题
_.min(array)
_.min(array) 用于返回数组中的最小值。
array:要查找最小值的数组。
返回值:数组中的最小值。如果数组为空,则返回 undefined。
示例:
javascript
console.log(_.min([4, 2, 8, 6])); // 输出:2
console.log(_.min([-3, -7, -11])); // 输出:-11
console.log(_.min([])); // 输出:undefined在这个例子中,_.min 返回了数组中的最小值。