Types [proposal]

List of prebuilt types:

string

let name = 'Mike'

int

let age = 29

float

let height = 189.3

array

let data: int[] = [1, 2, 3]

You don't need to declare variable type for basic types like numbers and strings - they are inferred automatically. Type declaration is necessary in complex data structures like Arrays, Sets etc.

Last updated

Was this helpful?