Conditionals Common practice to select items from a collection result = [] ary.each do |x| if x%2 == 0 result.push x end end