Last active
September 20, 2015 11:11
-
-
Save kasiapryczek/ab01d68c16550affd078 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fav_foods | |
food_array = [] | |
3.times do | |
puts "what's your favourite food?" | |
food_array << gets.chomp | |
food_array.each do |food| | |
puts "I like #{food} too!" | |
end | |
end | |
puts "favourite foods are #{food_array.join(", ")}" | |
end | |
fav_foods |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment