+ 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
1 Réponse
+ 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