📜  我们可以从数组中间推送或弹出一个名称吗 - Javascript 代码示例

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

代码示例1
var suits = ["hearts", "clubs", "Brooks Brothers", "diamonds", "spades"];

suits.splice(2, 0, "Brooks Brothers");

console.log(suits);