const result = [1, 2, 3, 4, 5]
.filter(x => x % 2 === 0)
.map(x => x * 10)
.reduce((sum, x) => sum + x, 0);
// 60Compose map, filter, and reduce in a chain to build expressive data pipelines.
Use map, filter, and reduce together to solve complex transformations.
Challenge: Given an array of numbers, filter even numbers, map them to their squares, then reduce to sum.