变量检测 typeof

Original 2018-11-24 22:45:34 237
abstract:var a="feir"undefineda"feir"typeof a"string"var b=2undefinedtypeof b"number"var c="1"undefinedtypeof c"string"Typeof 用来检测页面中变量是某种类型。

var a="feir"

undefined

a

"feir"

typeof a

"string"

var b=2

undefined

typeof b

"number"

var c="1"

undefined

typeof c

"string"

Typeof 用来检测页面中变量是某种类型。


Correcting teacher:查无此人Correction time:2018-11-25 09:45:28
Teacher's summary:换个人真不一定看得懂你写的啥。给点标点符号,用些打印函数,这样也方便我们批改,谢谢哈。

Release Notes

Popular Entries