Check out a more fleshed out version of the game at rectrangle.com
This is a basic example of Entity Component System (ECS) in Javascript. View the corresponding tutorial.
This is a no frills approach to demonstrate ECS. To demonstrate concepts, it does not use CommonJS / RequireJS or any other third party dependencies. Because this is used to demonstrate ECS specific concepts, many best practices (such as using modules, e.g., Browserify) are not observed in favor of simplifying concepts; this code is was developed for demonstration purposes.