String Interpolation

Learn about string interpolation in Ruby and why there’s a preference for it.

We'll cover the following

As mentioned before, we can stick strings together by using the + operator.

Consider the following code:

name = "Ada"
puts "Hello, " + name + "!"

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy