Concatenation and interpolation

suggest change

You can use the plus (\+) operator to concatenate strings:

'Dart ' + 'is ' + 'fun!'; // 'Dart is fun!'

You can also use adjacent string literals for concatenation:

'Dart ' 'is ' 'fun!';    // 'Dart is fun!'

You can use ${} to interpolate the value of Dart expressions within strings. The curly braces can be omitted when evaluating identifiers:

var text = 'dartlang';
'$text has ${text.length} letters'; // 'dartlang has 8 letters'

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents