<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<script>
// 删除数组元素
var arr=['李大','李二','李三','王大','王二','王三','孙大','孙二','孙三']
// splice(下标开始位置,删除长度,补充元素)
console.log(arr.splice(2,3));
console.log(arr);
console.log(arr.splice(2,3,'11','22'));
console.log(arr);
</script>
</body>
</html>
10-09
1344
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-10
1418
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
03-17
4589
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交