concat方法用于链接两个字符串,返回一个新字符串,不改变原字符串
var s1='zifuchuan'
var s2='tow'
s1.concat(s2)//"zifuchuantow"
s1//"zifuchuan"
该方法可以接受多个参数
'two'.concat('zifuchuan','three')//"zifuchuanthreetwo"
如果参数不是字符串,concat方法会将其先转为字符串,然后再连接
var one=1;
var two=2;
var three='3';
''.concat(one,two,three)//"123"
标签:22,s1,two,JS,var,zifuchuan,字符串,concat From: https://www.cnblogs.com/zhangxiaoguo/p/18659779