📌  相关文章
📜  从数组中删除一个项目 javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:09.931000             🧑  作者: Mango

代码示例6
let items = [12, 548 ,'a' , 2 , 5478 , 'foo' , 8852, , 'Doe' ,2154 , 119 ]; 
items.length; // return 11 
items.splice(3,1) ; 
items.length; // return 10 
/* items will be equal to [12, 548, "a", 5478, "foo", 8852, undefined × 1, "Doe", 2154,       119]   */