mediumJS ES6+#70

Map, filter, reduce chaining

Prompt

Given const numbers = [1, 2, 3, 4, 5, 6, 7], chain map, filter, and reduce to:

  1. Double each number (map)
  2. Keep only numbers > 5 (filter)
  3. Sum the result (reduce) Assign the answer to const result.

Hints

Solution

Your Code

10 min

Tests

Click Run to test your code