+ 1

Cannot read property of "x"

It kept saying that the property of x is undefined, but this event would occur temporarily. When the bullet collides with the ufo. How could i fix that? for(var i = 0; i < numberOfFruits; i++){ const bulletsShooting = bullets.filter(element => element.isShooting === true) for(var bulletShooting of bulletsShooting){ if(Collide(bulletShooting, fruits[i])){ fruits.splice(fruits.indexOf(fruits[i]), 1) numberOfFruits -= 1 player.score += 10 } } } https://code.sololearn.com/W5Y5Nkm3A7jB/?ref=app

13th Sep 2020, 6:53 PM
Tri Satria [NEW]
Tri Satria [NEW] - avatar
1 Resposta