JSFiddle - React, Tailwind, and code Playground

by luka kupunia

JavaScript

const arr = [{age: 24},{age: 20}];

const sum = arr.reduce((a,b) => {
	return a + b.age
},0)

console.log(sum)