SHARE
TWEET

Untitled

a guest May 19th, 2017 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def fav_foods
  2.   # code for this method goes in here
  3. end
  4.  
  5. def fav_foods
  6.     food_array = []
  7. 3.times do
  8.     puts "Name a favorite food."
  9.     food_array << gets.chomp
  10. end
  11. p food_array
  12.     puts "Your favorite foods are #{food_array.join(", ")}."
  13.     food_array.each { |food| puts "I like #{food} too!" }
  14. end
  15. fav_foods
RAW Paste Data
Challenge yourself this year...
Learn something new in 2017
Top