-
Notifications
You must be signed in to change notification settings - Fork 1
Primitives
Benjamin Dupont edited this page Aug 18, 2020
·
2 revisions
Number literals can be expressed using different bases.
10 -> decimal
0xA -> hexadecimal
0b1010 -> binary
Separators can also be used between digits.
1_000_000
0xFF_0A_00
0b1011001_11111001_0001010
Strings use double quotes.
"Hello, world !"
Escape codes include \n
, \t
, \\
and \u<codepoint>
.
String interpolation is possible using the $
character.
"My name is $name, and I was ${age - 1} years old last year."