return object in an array with the most props

前端 未结 0 1730
南旧
南旧 2020-12-12 20:27

Say I have an array of objects like this:

const arr = [
   { a: 1, b: 2, c: 3, d: 4 },
   { a: 1 },
   { a: 1, b: 2, c: 3 },
   { a: 1, b: 2 }
];
相关标签:
回答
  • 消灭零回复
提交回复
热议问题