getType
Returns the native type of a value.
- Return
'undefined'or'null'if the value isundefinedornull. - Otherwise, use
Object.prototype.constructor.nameto 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.