Simple Game Programming In JavaScript
In the previous article you learned how to create an animation with JavaScript using a timer mechanism, an image of a ball and CSS styles. This time we’ll make some adjustments to the CSS and the document object model (DOM) to create a simple ping-pong game. We’ll also be using keyboard input and events. With these tools you’ll be able to create different games in JavaScript, such as Breakout, Tetris, Frogger or your dream game.

