javascript的一些技巧

阅读更多
原文见http://www.aqee.net/seven-javascript-things-i-wish-i-knew-much-earlier-in-my-career/

var myApplication = function(){
	var name = 'Chris';
	var age = '34';
	var status = 'single';
	function createMember(){	
	};
	function getMemberDetails(){	
	};
	return{
		create:createMember,
		get:getMemberDetails
	}
}();
//现在写成 myApplication.get()和 myApplication.create() 就行了。


你可能感兴趣的:(javascript)