14. String interpoloation


#1

Why is this not accepted?

favorite_things = ["Ruby", "espresso", "candy"]

puts "A few of my favorite things:"

favorite_things.each do |thing|
puts "I love #{thing} !"
end


#2

Hi @jaydacoder ,

In the following statement, you have a space just before the exclamation point, that needs to be removed ...

puts "I love #{thing} !"

#3

It worked, thanks!

So I did grasp the concept, just that CC was being exactly precise. Good to know. Thanks!


#4

what is the answer @jaydacoder


#5

The answer is

     favorite_things = ["Ruby", "espresso", "candy"]

     puts "A few of my favorite things:"

     favorite_things.each do |thing|
         puts "I love #{thing}!"
     end

DO NOT put a space after #{thing}


#6

Thanks for your help. had the same problem here.