jsjsjs


var TooL = {};
(function(t){
	
	function common(){
		console.log("common");
    }

	var a = function(){};
	a.prototype.get = function(){
		console.log("a.get");
	},
	a.prototype.set = function(){
		console.log("a.set");
	},	

	a.prototype.CM = common,
	TooL.tools = a

})(TooL);

var tool = TooL.tools;
var t = new tool();
t.get();
t.set();
t.CM();
var d0 = {};
(function(t){
	function t(){
		console.log("call t()");
	}
	function n(){
		console.log("call n()");
	}
	const o = 100,s = {
		test:function(){
			t();
			console.log("call test()");
			n();
		}
	};
	
	d0.doSomething = s
})(d0);

var o = d0.doSomething;
o.test();
var self = (
	function(){

		function A() {
        	return console.log("call self.A");
		}
	
		return function () {
        	return A();
		}
    }
)();
self();

相关