Try Install Learn Blog API Packages GitHub
Pages

Literals

Fixed values such as Numbers , Strings and Booleans are called literals, this page goes through all literal types in the language.

Bool

Represents the Boolean type. It has two possible values true and false.

true
false

Number

Represents the Number type from JavaScript.

3.14
42
-10

Currently there is no support for other representations such as hex or binary.

String

Represents the String type from JavaScript.

"hello world"

String concatenation works the same as in JavaScript:

"hello" + " world"

Escaping works as in JavaScript:

"hello \"world\""

Strings can span multiple lines:

"hello
world"

And can be split into smaller consecutive parts:

"hello " \
"world" == "hello world"

Expressions can be interpolated in a string with the #{...} syntax:

let name = "Joe"

"Hello #{name}" /* Hello Joe */