📌  相关文章
📜  javascript 将项目插入数组 - Javascript 代码示例

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

代码示例1
var colors=["red","blue"];
var index=1;

//insert "white" at index 1
colors.splice(index, 0, "white");   //colors =  ["red", "white", "blue"]