methods:{
toggleTask(id){
let taskIndex;
this.tasks.forEach( (item, index) => {
if ( item.id === id){
taskIndex = index
}
});
this.tasks[taskIndex].completed = !this.tasks[taskIndex].completed;
}
},
task.completed = !task.completed