📜  如何从数组中删除变量 javascript 代码示例

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

代码示例4
let colors = ["red","blue","car","green"];
//remove car from the colors array
colors.splice(color[2]); // colors = ["red","blue","green"]