I want to remove some elements from the array containing the word Evil (filterString). Here is what I get for the original array (guests): [‘Partner’, ‘Nice Relative 2’, ‘another evil’, ‘another one’, ‘strange Evil is here’, ‘someone Nicer’] Just want the guests array updated once the desired string (Evil) is filtered. Answer Since you want to mutate the original array
Tag: array-splice
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