A

Admin • 833K Points
Coach

Q. What is the use of the includes() method in JavaScript?

  • (A) Checks if an array contains a specified value
  • (B) Adds a value to an array
  • (C) Removes a value from an array
  • (D) Replaces a value in an array
  • Correct Answer - Option(A)
  • Views: 22
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin

includes() returns true if the specified value is found in the array.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.