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 the reduce() method do?

  1. A Reduces array length by removing elements
  2. B Executes a reducer function on each element to produce a single output value
  3. C Filters elements matching a condition
  4. D Sorts and shortens the array
Answer

Executes a reducer function on each element to produce a single output value

reduce accumulates a result across the array. Always pass an initial value, or reduce on an empty array throws a TypeError.

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