首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

typeof typeof 123 为什么返回的是string类型?解决办法

2012-04-07 
typeof typeof 123 为什么返回的是string类型???如题....[解决办法]var temptypeof 123//tempnumbe

typeof typeof 123 为什么返回的是string类型???
如题....

[解决办法]
var temp=typeof 123;//==>temp='number'
typeof typeof 123;//==>typeof 'number'==>'string'
[解决办法]

探讨

var temp=typeof 123;//==>temp='number'
typeof typeof 123;//==>typeof 'number'==>'string'

[解决办法]
typeof 123 返回的是字符串number,typeof number ,当然是字符串了
[解决办法]
表示赞同
[解决办法]
typeof 123首先返回的是Number类型,typeof Number则是String类型了
[解决办法]
typeof 123 返回的应该是字符串 'number'
所以typeof typeof 123 ----typeof 'number'--String
[解决办法]
楼上们,全++

热点排行
Bad Request.