javascript 使用Splice()从数组中删除元素

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javascript 使用Splice()从数组中删除元素相关的知识,希望对你有一定的参考价值。

let array = ["a", "b", 1, 2, 3];
array.splice(2, 1);   // remove 1 element, beginning with the 3rd (position, num) - returns 1

以上是关于javascript 使用Splice()从数组中删除元素的主要内容,如果未能解决你的问题,请参考以下文章