匿名函數,window參數,局部變量,閉包,原型鍊,繼承
下面這個函數時都包括了
(function(){//局部作用域
var jQuery=function(){
return new jQuery.prototype.init();//橋接設計模式
}
jQuery.prototype={
init:function(){
}
};
jQuery.prototype.init.prototype=jQuery.prototype;
window.$=jQuery;
})(window);