隐居以求其志,行义以达其道
typeof 可能返回的值
typeof 可能返回的值

typeof 可能返回的值

类型结果
Undefined"undefined"
Null"object"原因
Boolean"boolean"
Number"number"
BigInt"bigint"
String"string"
Symbol"symbol"
Function(在 ECMA-262 中实现 [[Call]];classes也是函数)"function"
其他任何对象"object"

原始数据类型:null, undefined, string, number, boolean, bigint, symbol (7)

引用数据类型:object( {}, [], Function(Array, Set, Map, Promise, ClassX…) )