Created
November 10, 2016 15:43
-
-
Save sbernhardi/70a89d8641222a65350b85eca755fc46 to your computer and use it in GitHub Desktop.
CF Ruby 01
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 "Name a favorite food." | |
food_array << gets.chomp | |
end | |
puts "Your favorite 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