getType
Returns the native type of a value.
- Return
'undefined'
or'null'
if the value isundefined
ornull
. - Otherwise, use
Object.prototype.constructor.name
to get the name of the constructor.
Returns the native type of a value.
'undefined'
or 'null'
if the value is undefined
or null
.Object.prototype.constructor.name
to get the name of the constructor.