← Back to Gists

String interpolation clear

📝 Ruby
catherinemorgan
catherinemorgan · Level 3 ·

In Ruby, string interpolation with #{} lets you embed expressions directly into double-quoted strings for dynamic content.

Ruby
name = "Alice"
age = 30
greeting = "Hello, #{name}. You are #{age} years old."
puts greeting

Comments

No comments yet. Start the discussion.