DEV Community

loading...

Discussion on: Learn Javascript through a Game

Collapse
manipandian profile image
Manikandan

I am curious to know,
Why did you call prevent default in each keyDown calls?
What is the purpose of that method in this case?

Forem Open with the Forem app