1. Home
  2. Computer Science MCQs
  3. Javascript
  4. Which array method returns a new array containing the…

Added 2 Nov 2026

Which array method returns a new array containing the result of calling a function on every element?

  1. map() Correct answer
  2. reduce()
  3. filter()
  4. forEach()

Correct answer

A. map()

14 views

MCQSEXAM

Explanation

map() transforms each element and returns a new array of the same length. forEach() returns undefined, filter() keeps only matching elements, and reduce() combines them into a single value.

Reference

Asked in: Frontend Developer Tests, Technical Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is A? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Javascript MCQs

Practise all Javascript MCQs

Similar MCQs