Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Many games are defined by the objects that give them purpose; whether they are the blocks in Tetris, the pieces in chess, or even Mario in Super Mario. There aren't many computer games around that don't have objects of some sort. In the case of your space bowling game, there are two main objects: you have the asteroids (including the bigger player asteroid) and the platform that the asteroids sit on. It's quite amazing how simple a game can seem when you break it down into its core objects and components.
Particularly when you're going to have multiple objects within a game, it's a good idea to define them as JavaScript classes. This makes sure that they're all based on the same code, and that you can rely on them all to contain the same properties and methods. For your game, you're going to create a class for the asteroids, but not for the platform. This is because the platform is a completely unique object, which will only occur once in the game, so it's not necessary to use a class, which would allow you to create multiple platforms.