MediumArray Methods💻 Output Question

filter then map chain

💡

Hint

Array methods chain fluently — each returns a new array for the next method.

What does this output?

const result = [1, 2, 3, 4, 5, 6]
  .filter(n => n % 2 === 0)
  .map(n => n * 3);
console.log(result.join(','));

Correct Output

6,12,18

Why this output?

Explanation: filter keeps evens [2,4,6], map multiplies each by 3.

Key Insight: Array methods chain fluently — each returns a new array for the next method.

More Array Methods Output Questions

Easymap transforms each elementMediumreduce accumulates to a single valueMediumfind returns first match; filter returns allMediumreduce to build a frequency object

Practice predicting output live →

66 output questions with instant feedback

💻 Try Output Quiz