I am struggling with returning an array of owner names from a given array of dog objects.
I know the reduce method is required in this instance, but I can't quite figure out how to proceed
function getPugOwners(dogs) {
/*
This function takes an array of dog objects and returns an array of the names of all the owners.
E.g. [
{name: 'Beatrice', breed: 'Lurcher', owner: 'Tom'},
{name: 'Max', breed: 'Pug', owner: 'Izzi'},
{name: 'Poppy', breed: 'Pug', owner: 'Anat'}
]
will return ['Izzi', 'Anat']
*/