📅  最后修改于: 2022-03-11 15:02:24.580000             🧑  作者: Mango
const array = [2, 5, 9];
console.log(array);
const index = array.indexOf(5);
if (index > -1) {
array.splice(index, 1);
}
// array = [2, 9]