A

Admin • 828.03K Points
Coach

Q. What will this return?

Code:
[1, 2, 3].includes(2);
  • (A) true
  • (B) false
  • (C) undefined
  • (D) NaN
  • Correct Answer - Option(A)
  • Views: 5
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin
includes() checks if the element is present and returns true or false.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.