type

Returns the type name of a value.

This function does not generate a change.

Function

type(value)

Arguments

Argument Type Description
value any (required) The value to return the type name for.

Return value

Type name of the given value.

Example

Returns the type name of a given value:

[
    type( nil ),
    type( 42 ),
    type( 3.14 ),
];

Example return value in JSON format

[
    "nil",
    "int",
    "float"
]