📜  javascript push in position - Javascript 代码示例

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

代码示例2
var arr = [];
arr[0] = "Jani";
arr[1] = "Hege";
arr[2] = "Stale";
arr[3] = "Kai Jim";
arr[4] = "Borge";

console.log(arr.join());
arr.splice(2, 0, "Lene");
console.log(arr.join());