📅  最后修改于: 2022-03-11 15:04:26.329000             🧑  作者: Mango
const arr = ['a', 'b', 'c', 'd', 'e'];
const indexToRemove = 2; // the 'c'
const result = [...arr.slice(0, indexToRemove), ...arr.slice(indexToRemove + 1)];
console.log(result);
// ['a', 'b', 'd', 'e']