just a simple code for calculating average age of 'adult' array using reduce method.
const ageAvg = adult.reduce((acc, age) => {
acc + age;
}, 0);
console.log(ageAvg / adult.length);
im having a hard time figuring out what is happening behind the scene when i use curly braces for my arrow function content as in the example, cause when i do, ageAvg gives me NaN and when i dont use any braces at all for the acc + age it works totally fine. i guess it has something to do with the 'this' keyword but i would like to understand exactly whats going on so