how to delete the id in the array code example
Example: remove id from array javascript
const drinks = ['Cola', 'Lemonade', 'Coffee', 'Water'];
const id = 2;
const removedDrink = drinks.splice(id, 1);
const drinks = ['Cola', 'Lemonade', 'Coffee', 'Water'];
const id = 2;
const removedDrink = drinks.splice(id, 1);