I have the following JS, when it runs in IE8, I get the error: ILL.TEST is null or not an object, it works on other browsers through. any idea why this is happening? thanks for help in advance.
//global name space
var ILL={};
ILL.TEST=(function(){
function init(){
}
return {
init:init
};
})();
(function(){
//error ILL.TEST is null or not an object
ILL.TEST.init();
})()
The problem was that I define the
ILL.TESTafter it is called. so this will be a problem: