I have created a function for removing an item from an array when the delete icon is pressed but the deletion is not working. Below is the code with the function that is sup