Mega Code Archive
Categories
/
Ruby
/
Array
Get the flip side with index
# It returns the index of the first element that matches the object: q1 = %w[ January February March ] q1.index "March" # => 2