Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

What does Array.prototype.map() return?

  1. A The original array, modified in place
  2. B A new array with the results of calling the function on every element
  3. C A single accumulated value
  4. D The number of elements processed
Answer

A new array with the results of calling the function on every element

map is non-mutating and always returns a new array of the same length. forEach returns undefined and reduce returns a single value.

All Javascript MCQs

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as