I need assistance with implementing a reduce function:
users.reduce(function (acc, obj) { return acc + obj.age/3; }, 0);
within the following function structure:
function calculateUserAverageAge(users) {};
To analyze this array of objects and calculate the average of their "age" values:
const users = [{
name: 'Brendan Eich',
age: 56,
}, {
name: 'Linus Torvalds',
age: 48,
}, {
name: 'Margaret Hamilton',
age: 81,
}];
Your guidance and support are greatly appreciated!