V
V
Vyacheslav Yashnikov2016-05-15 16:11:37
JavaScript
Vyacheslav Yashnikov, 2016-05-15 16:11:37

How to properly remove elements from an array?

Tell me how to correctly remove elements from the array:
Clicked on the removal of the last element in the list: GUAVA 1 kg. Here is a screenshot from the debugger:
3fd888f7f21a45e0a7d17bc4472e3747.png

The function returned an array by deleting the position of PITAHAYA 1 kg. not GUAVA 1 kg.
12c96c6309f94d1dbb097f1a9a49bc71.png

Where is the mistake?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivanq, 2016-05-15
@VyacheslavY

Line 464, you have:
Should be:
return i.name == name(double equals)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question