-
返回 number
typeof 1
typeof new Date().getTime()
-
返回 undefiend
typeof undefined
typeof console.log(1); 先打印1,再打印 undefined
-
返回 string
typeof ' '
typeof '1'
typeof typeof null
-
返回 boolean
typeof false
typeof true
typeof ( 1 == 1 )
-
返回 function
typeof function() {}
typeof Object
typerof Number
typeof Array
typeof String
-
返回Object
typeof null
typeof {}
typeof []
typeof new Array()
typeof new Object()
typeof new Number()
class A{} typeof new A()
-
返回 symbol
typeof Symbol('name')