Ruby | Array class include?() operation
Array#include?() : include?() is a Array class method checks if the argumented object is present in the array or not. Syntax: Array.include?() Parameter: obj - element to find Return: true - if the element is present; otherwise false Code #1 : Example for include?() method # Ruby code for include?() method # declaring array a = [18, 22, 33, nil, 5,