Data types
Primitives
Type
Name
Values
Null
null
null
Boolean
bool
true false
Number
num
123 3.14 0b10 0x1ab
String
str
"hello" 'hi world'
// todo
Collections
Type
Name
Values
Array
arr
[] [1, 2, 3] ['a', 'b']
Map
map
{} { a: 4, b: 'hi' }
Array and map are special types to store multiple values.
ArrayMapType of...
To get type of a value, just use the keyword typeof.
typeof is an unary operator, so you need group your value in many cases.
Convert types
// todo
Last updated
Was this helpful?