Skip to main content

String expressions

Literal​

Creates a new string value.

"valid"

Addition/concatenation​

An addition concatenates the strings. The result is a string containing the characters of both strings.

"foo" + "bar"
// "foobar"
tip

The concatenation is only available for string values. For other types, you can use the string() function to convert the value into a string first.

"order-" + string(123)