+ 4

why wont my game run on a live sever?

I just made a simple game on visual studio code, where a player has to chase the square. But im not sure why its not running on the live sever ? I am very new to java script and programming in general so please teach me like im a 5 year old thank you. link to code https://code.sololearn.com/Wb0dJ50Kto9d i followed a youtube video to do this as im new and just wanted to get stuck in. https://www.youtube.com/watch?v=Z3OnwkPOfY4

27th Jan 2020, 2:13 PM
Lewis Casey
Lewis Casey - avatar
1 Resposta
+ 3
line 54 wrong : document,addEventListener('keypress') correct : document.addEventListener('keypress', handleInput, false); explanation : should be dot (.) not comma (,) addEventListener needs a second argument - the callback function
27th Jan 2020, 4:01 PM
Gordon
Gordon - avatar