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

  • (A) include?
  • (B) has?
  • (C) contains?
  • (D) exists?
πŸ’¬ Discuss
βœ… Correct Answer: (A) include?
Explanation: The include? method returns true if the element exists in the array.
Explanation by: Rati Dubey
The include? method returns true if the element exists in the array.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
102
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Rati Dubey
Publisher
πŸ“ˆ
80%
Success Rate