📅  最后修改于: 2022-03-11 15:03:26.788000             🧑  作者: Mango
let items = ['a', 'b', 'c', 'd'];
let index = items.indexOf('a')
let numberOfElementToRemove = 1;
if (index !== -1) { items.splice(index,numberOfElementToRemove)}