What will be the output of the following code?
const arr = [1, 2, 3, 4, 5, 6];
const result = arr.filter(num => num % 2 === 0)
.map(num => num * 2)
.reduce((acc, curr) => acc + curr, 0);
console.log(result);
24
22
12
18
This question is part of this quiz :
JavaScript Functions