mistake?
snake.js:37 Uncaught TypeError: Cannot read property 'drawImage' of undefined
at _draw
https://gist.github.com/Djerass/5246cc3d8f4247f72987c86be71b2e7e
Cause you got an undefined object
Did you find out what document.getElementById('snakeGame') returns? I can't see your HTML, but maybe the id is wrong. Can you just use document.querySelector('canvas')?
Обсуждают сегодня