Course of Raku / Essentials / Variables and data types essentials / Strings / String concatenation
Quiz 3: Concatenating strings again
Which lines are correct Raku code to concatenate strings?
| 0 | 'alpha' + 'beta' | A + does not concatenate strings. |
| 0 | 'alpha' . 'beta' | Neither does a .. |
| 1 | 'alpha' ~ 'beta' | Only the ~ is a string concatenation operator. |
| 0 | 'alpha' ~~ 'beta' | One tilda is enough. This line is syntactically correct, but it does not concatenate the strings. |
| 0 | α ~ β | Strings need to be quoted. |
| 1 | 'α' ~ 'β' |
Course navigation
← Quiz 2: Concatenating strings and numbers | Variable interpolation →
Translations of this page: English • Deutsch • Español • Italiano • Latviešu • Nederlands • Български • Русский • Українська