Javascript lesson three. Arcanoid game. Organize your code.

Ok Google, where is my whiskey continuing with the Arcanoid game and Javascript lessons.

Before we start,

I believe you already know:

  • variable scope in Javascript;
  • objects;
  • JS Functions; anonymous functions; self-executing functions (read here).

Why modules?

Applications in real life are big enough. That means thousands lines of code. If all they were in one file, it would be really hard to handle it.
The obvious solution is divide the code in several files. There are some pitfalls here:
Continue reading