I have an array that I\'ve created in TypeScript and it has a property that I use as a key. If I have that key, how can I remove an item from it?
let a: number[] = []; a.push(1); a.push(2); a.push(3); let index: number = a.findIndex(a => a === 1); if (index != -1) { a.splice(index, 1); } console.log(a);