include? with parenthesis : include « Array « Ruby






include? with parenthesis


year = [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]


year.include?( 2010 ) # => false

 








Related examples in the same category

1.Check an Array for a Certain Item
2.Is an element in this array