在数组中找到指定属性值最大的元素 数组为空时返回 undefined
findMaxByProperty([{ score: 3 }, { score: 7 }, { score: 1 }], 'score')// { score: 7 } Copy
findMaxByProperty([{ score: 3 }, { score: 7 }, { score: 1 }], 'score')// { score: 7 }
在数组中找到指定属性值最大的元素 数组为空时返回 undefined