Hey guys, in this project my 'remove' buttons are working fine except for the last one which i can't seem to understand why
#My remove button isnt working
3 messages · Page 1 of 1 (latest)
myArr = [0, 1, 2, 3, 4, 5, 6]
myArr[4] === 4
myArr.splice(3, 1)
[0, 1, 2, 4, 5, 6]
myArr[4] === 5
First you need to find out the index of the element in the array foodOrderedArray, which has an object with id === menuId and only then remove this element
ok thank you Iryna...this helped to figure out what was wrong...i was using the id instead of the index