Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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.

person = 'Foo'

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