0PricingLogin
Dart Academy · Lesson

String Interpolation With the Dollar Sign

Embed values and expressions inside strings.

What Interpolation Means

Interpolation lets you drop a value straight into a string, so Dart builds the final text for you instead of gluing pieces by hand.

The Dollar Sign Trigger

Inside a string, the dollar sign tells Dart the next word is a variable to insert. It is the heart of interpolation.

var name = 'Ada';
var hi = 'Hi, $name!';

All lessons in this course

  1. String Literals and Quotes
  2. String Interpolation With the Dollar Sign
  3. Multi-line and Raw Strings
  4. Everyday String Methods
← Back to Dart Academy