var str = [1,2,3,4,5]; //字符数组,数组
var str1 = str; //引用赋值
str1 = str;
str1.length--;
console.log(str.length); //4
console.log(str1.length); //4
console.log(str); //[1,2,3,4]
console.log(str1); //[1,2,3,4]
JS——String坑1
最新推荐文章于 2021-11-19 16:38:36 发布