Skip to content

Instantly share code, notes, and snippets.

@mattcantstop
Last active August 29, 2015 14:16
Show Gist options
  • Save mattcantstop/5902e22a456266ca1dd6 to your computer and use it in GitHub Desktop.
Save mattcantstop/5902e22a456266ca1dd6 to your computer and use it in GitHub Desktop.
fruits = ["apple","rice","pizza","orange"]
fruits.each do |food_item|
if food_item == "apple" or food_item == "orange"
puts "I like to eat fruit"
else
puts "I like to eat #{food_item}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment