typeOf

Returns the type of the given argument, as a string.

Examples

typeOf("") // "string"
typeOf([]) // "array"
typeOf(true) // "bool"
typeOf(null) // "null"
typeOf(1) // "int"
typeOf(1f) // "float"
typeOf(1.1) // "float"

Last updated