摘要:
摘自《你不知道的js》这本书,第五章第五节:现代模块机制。 感觉这个很牛很高大上,但是不能完全看懂,抄下来,慢慢品读理解: var MyModules = ( function Manager(){ var modules = {}; function define(name,deps,impl){ 阅读全文
摘要:
var foo = ( function CoolModule(){ var something = 'cool'; var another = [1,2,3]; function doSomething() { console.log(something); } function doAnothe 阅读全文