Skip to content

Instantly share code, notes, and snippets.

@haru01
Last active October 27, 2019 04:25
const result = [1,2,3,4,5,6]
.filter(n => n % 2 === 0)
.map(n => n * n)
.reduce((a, b) => a + b, 0);
console.log(result); // (2*2) + (4*4) + (6*6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment