typeof
语法:typeof(表达式)和typeof xxx
值:undefined
object
boolean
number
string
function
symbol
bigint
栗子:
typeof NaN //number
typeof Infinity //number
typeof Math.LN2 //number
typeof typeof(1) //string
typeof 42n //bigint
typeof Boolean(1) //boolean
typeof !!1 // boolean
typeof Symbol() //symbol
typeof Symbol.iterator //symbol
typeof undefined // 'undefined';
typeof abc //'undefined';
typeof {} //object
typeof [] //object
typeof /d/ //object
typeod null //object
typeof new Boolean(true) //object
typeof new Number(1) //object
typeof new String('abc') //object
typeof function() {} //function
typeof class C {} //function
typeof Math.sin //function
typeof Math.sin() //number