Lets assume modulex and moduley both are not declared at all.
Now consider two scenarios:
var modulex = modulesx || {}; // This line of code works fine
moduley = moduley || {}; // but this code throws error saying moduley is undefined.
Again,
var modulex = moduley || {}; // This also throws error saying moduley is undefined.
Please elaborate on this one.