removeTask(data:any){
const index: number = this.list.indexOf(data);
if (index !== -1) {
this.list.splice(index, 1);
}
}
const drinks = ['Cola', 'Lemonade', 'Coffee', 'Water'];
const id = 2;
const removedDrink = drinks.splice(id, 1);
removeElement(data:any){
const index: number = this.list.indexOf(data);
if (index !== -1) {
this.list.splice(index, 1);
}
}