Home >Web Front-end >JS Tutorial >A brief analysis of the typeof operator in JavaScript_Basic knowledge
If the operator of typeof is a number, string or Boolean value, the result it returns is "number", "string" or "boolean". For object, array or null, it returns
is "object". For function operands, it returns "function". If the operand is undefined, it will return "undefined".
When the operand of typeof is a wrapper object such as Number, String or Boolean, it returns "object". In addition, for Date and RegExp objects, it also returns "object".
For objects that are not part of the JavaScript core language but are provided by the JavaScript embedded environment, the return value of typeof is implementation determined.