📅  最后修改于: 2022-03-11 15:03:50.658000             🧑  作者: Mango
var colors=["red","blue"];
var index=1;
//insert "white" at index 1
colors.splice(index, 0, "white"); //colors = ["red", "white", "blue"]