To be absolutely correct, this is not the order of inclusion that matters, but the order of code execution. In most cases, Andy and Segfault's instructions are great, but sometimes they include a class file before its consumers are scarce. For example, if you use ExtJS and you accidentally define your class inside the onReady
handler as follows:
Ext.onReady(function() { myClass = ... }.bind(this));
it will not be executed by the time your second src file is included in the page and is executed.
I know the example is a little far-fetched :), but just make sure your code is executed in the correct order, and not just in the correct order.
source share