A

Admin • 833K Points
Coach

Q. Which method is used to check if an array includes a specific element?

  • (A) include?
  • (B) has?
  • (C) contains?
  • (D) exists?
  • Correct Answer - Option(A)
  • Views: 29
  • Filed under category Ruby
  • Hashtags:

Explanation by: Admin

The include? method returns true if the element exists in the array.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.