const sum = [1, 2, 3, 4] .filter(n => n % 2 === 0) .map(n => n * 10) .reduce((acc, n) => acc + n, 0); console.log(sum);