splice in javascript(vue) not working as expected after adding class dynamically

I’m trying to delete an element from an array using array splice method. I’m also using animate.css and I dynamically add the class ‘fadeOutDown’ before deleting the element. Then I’m using a timeout function to wait for the animation to complete and remove the element from the array using index. When I click the delete button the index of the element performs the animation but additionally the very next index is also removed from the DOM but not from the array. Below the html and js-function for removing the element: Answer The problem is that using index as key. You