📌  相关文章
📜  从数组 javascript 代码示例中删除 id

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

代码示例2
const drinks =  ['Cola', 'Lemonade', 'Coffee', 'Water'];
const id = 2;
const removedDrink = drinks.splice(id,  1);