most efficient way to find average using lodash

Why all people gets over-complicated here?

const people = [
  { name: 'Alejandro', budget: 56 },
  { name: 'Juan',      budget: 86 },
  { name: 'Pedro',     budget: 99 },
];

const average = _.meanBy(people, (p) => p.budget);
console.log(average);
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.min.js"></script>

As per the docs: https://lodash.com/docs/#meanBy

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)