怎么求一个对象中不同属性的最大值例如: let obj = { a:3, b:4 c:10 d:20}
let obj = { a:3, b:4, c:10, d:20 } let nums = Object.values(obj) let max = Math.max.apply(null, nums) console.log('max', max) // 20
通过参数名获取参数,两两比较返回最大值