TYPEOF

Returns the type of a value

Parameters

value * (required) - A value to get the type of

Returns

String - The type of the value

Examples

TYPEOF('test')

// returns "string"
TYPEOF(1)

// returns "number"
TYPEOF(true)

// returns "boolean"
TYPEOF(null)

// returns "null"
TYPEOF(new Date)

// returns "date"
TYPEOF({ name: 'Test' })

// returns "object"
TYPEOF([1, 2, 3])

// returns "array"