You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You should yet clear the Interval of laserID, otherwise every laser beam exist forever and it's index value will continue decreasing every interval. It will probably never result in a problem for this little game, however, is not good practice to keep the interval alive.
Hey Ania,
This is the error running your unadulterated code with the exception that I corrected the link to the css file in the html file.
Uncaught TypeError: can't access property "classList", squares[currentLaserIndex] is undefined
moveLaser https://fishbite.github.io/space-invaders/app.js:107
setInterval handlershoot https://fishbite.github.io/space-invaders/app.js:130
EventListener.handleEvent https://fishbite.github.io/space-invaders/app.js:134
app.js:107:5
It occurs when the laser shot exits the top of the screen and I'm not sure how to fix it!!! Any ideas?
Thanks for the video tutorial BTW. It's much appreciated by many folks out there especially myself :)
The text was updated successfully, but these errors were encountered: