-
页面中可是看到内容 都是属于字符串
-
所有基本类型与字符串相加 都会转化为字符串
-
字符串拼接方式
var myname=‘zhumingxing’;
var is=‘big’
var dec=‘huohai’;
字符串拼接
console.log(myname+is+dec)=>zhumingxingbighuohai
字符串加数据类型
console.log(myname+520);=>zhumingxing520
字符串加布尔类型
console.log(myname+false);=>zhumingxingfalseconsole.log(dec+undefined)=>huohaiundefined
console.log(myname+‘shigemeinv’)=>zhumingxingshigemeinv
console.log(myname+null)=>zhumingxingnull