Medium javascript

Reduce product #20

Problem

JavaScript: Reduce product #20

Hints
  • map, filter, reduce

Your practice code

Ready — edit the code above and click Run.

Solution

console.log([...Array(8)].reduce((a,_,i)=>a*(i+1),1));

Try solving on your own first, then reveal the official answer.

Explanation

Array methods are core to JS interviews.

Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details