← Quiz: Functions, Arrays and Objects: all 10 questions
Quiz: Functions, Arrays and Objects · Question 3 of 10
What does this print? (code)
What does this print?
console.log([3, 4, 5].reduce((acc, n) => acc + n, 10));
- A.12
- B.22
- C.60
- D.345
Answer & explanation
Correct answer: 22
Starting from 10: 10 + 3 + 4 + 5 = 22.
Can you get the rest right without peeking?
Take the timed Quiz: Functions, Arrays and Objects quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →