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 every() array method return?

  1. A A new array of matching elements
  2. B true if all elements satisfy the condition
  3. C The first matching element
  4. D The number of matching elements
Answer

true if all elements satisfy the condition

every returns a boolean and short-circuits on the first failure. On an empty array it returns true, which occasionally surprises people.

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