Map, Filter and Reduce
Talk it through with a coach who asks guiding questions and gives hints until you reach the answer. Pass to mark the challenge as completed.
The problem
- easy
- Pro
You have an array of orders, each with a status and a total. You need the totals of the paid orders, and then their sum. Explain how you'd do this with map, filter and reduce instead of a for loop, and when a plain loop might still be better.
Talk this problem through with an AI coach
This is a Pro challenge. Sign in with Google, then upgrade to start a voice session.