数据类型与类型转换
详细查看w3cschool脑图
1、可用typeof检测的数据类型 number string boolean object undefined function
注意null 用typeof检测时会返回Object
NaN 的数据类型是 number
数组(Array)的数据类型是 object
日期(Date)的数据类型为 object
未定义变量的数据类型为 undefine
详细查看w3cschool脑图
1、可用typeof检测的数据类型 number string boolean object undefined function
注意null 用typeof检测时会返回Object
NaN 的数据类型是 number
数组(Array)的数据类型是 object
日期(Date)的数据类型为 object
未定义变量的数据类型为 undefine