// 最大值
Math.max.apply(Math, array.map(function(item) {return item.value}))
// 最小值
Math.min.apply(Math, array.map(function(item) {return item.value}))
// 最大值
Math.max.apply(Math, array.map(function(item) {return item.value}))
// 最小值
Math.min.apply(Math, array.map(function(item) {return item.value}))
本文标题:数组对象查询对象属性的最大值或最小值
本文链接:https://www.haomeiwen.com/subject/wtafsctx.html
网友评论