Strings

Overview

  • A string is delimited with either single or double quotes ‘this is a string’ “this is also a string”
  • We use “string #{ruby code} string” for String interpolation.

Try typing this in IRB

‘I think that ruby is fun’
“I think that ruby is fun”
“I know that 2 + 2 = #{2+2}”

Exercises