types

Contains functions for type checking and conversion

Constants

OBJECT : number = 0

NUMBER : number = 1

STRING : number = 2

ARRAY : number = 3

MAP : number = 4

FUNCTION : number = 5

Functions

byte(value) — converts value to byte

double(value) — converts value to double

float(value) — converts value to float

int(value) — converts value to int

long(value) — converts value to long

number(value) — converts value to number if possible

use types

println typeof(number("2.3")) // 1 (NUMBER)

short(value) — converts value to short

string(value) — converts value to string

use types

println typeof(string(1)) // 2 (STRING)

typeof(value) — returns the type of value

use types

println typeof(1) // 1 (NUMBER)
println typeof("text") // 2 (STRING)
println typeof([]) // 3 (ARRAY)