JavaScript——typeof

typeof(a)

返回a的数据类型,返回值的类型是string,取值可以为:

undefined

null

string

number

object

boolean

function

变量本身没有类型,其类型取决于变量储存的数据。

原文地址:https://www.cnblogs.com/yuanfy/p/6832418.html