0
What is the output of the following JavaScript code?
console.log([1, 2, 3, 4].map(x => x * 2).filter(x => x > 4).reduce((a, b) => a + b, 0));- A20
- B14
- C24
- D12
Correct answer: B
What is the output of the following JavaScript code?
console.log([1, 2, 3, 4].map(x => x * 2).filter(x => x > 4).reduce((a, b) => a + b, 0));