How to remove elements from an array?

Tell me how to remove elements from the array:
Pressed to delete the last item in the list: GUAVA 1 kg. Here is a screenshot from the debugger:

The function returned the array by removing the position of 1 kg PITAHAYA and not GUAVA 1 kg.

What is the error?
July 9th 19 at 13:37
1 answer
July 9th 19 at 13:39
Line 464, You have:
return = name
Should be:
return == name (double-equals)

Find more questions by tags ArraysJavaScriptjQueryOOP