摘要: 1 var s=1;2 console.log(typeof s); //number3 s+="1";4 console.log(typeof s); //string5 console.log(s); //116 s++;7 console.log(typeof s); //number8 console.log(s); //12第三行,number和string相加得到的结果是string,这很容易理解。但是第六行,++操作符得到的结果是number类型。var ss = "1";ss++;console.log(ss);//2"1&qu 阅读全文
posted @ 2013-02-03 19:51 allexwang 阅读(157) 评论(0) 推荐(0) 编辑