阅读背景:

节点JS如何将字符串转换为对象

来源:互联网 

The exampleCode is:

// 4. execute tower.init latter read from bellow (1)
tower={
  init:function(){ console.log('horee im here now, finaly after a day code');}
}

// 3. app object
app ={ 
  publish:function(what,data){
     data.nextModule.init();
  }
}
// 2. then call this funct
var fires = function(){
   return app.publish('subscriber',{ nextModule : 'tower'});
}
// 1. execute this first
fires();
// 4. execute tower.init 



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: