Lodash min method
语法
Computes the minimum value of array. If array is empty or falsey, undefined is returned.
参数
array (Array) − The array to iterate over.
输出
(*) − Returns the minimum value.
实例
var _ = require('lodash');
var values = [ 4, 3, 1, 5, 6];
var result = _.min(values);
console.log(result);
Save the above program in
tester.js. Run the following command to execute this program.
Command
输出