Hint
reduce is the most powerful array method — it can produce any output type.
const items = ['hello', 'world', 'foo'];
const total = items.reduce((acc, w) => acc + w.length, 0);
console.log(total);13
Explanation: 5+5+3=13. reduce folds the array into one value.
Key Insight: reduce is the most powerful array method — it can produce any output type.