A

Admin • 833.24K Points
Coach

Q. Which array method returns a new array with only truthy values?

  • (A) filter()
  • (B) map()
  • (C) reduce()
  • (D) forEach()
  • Correct Answer - Option(A)
  • Views: 32
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin

filter() creates a new array with elements that pass a test.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.