Hello Foo - puts with interpolation


Putting the interpolation to use, here is how we greet our programmer using puts and a variable interpolated in a double-quoted string.

examples/intro/hello_foo.rb
person = 'Foo'

puts "Hello #{person}, how are you?"

Hello foo, how are you?