看ext类的extend方法的两点疑问

        extend : function(){
            // inline overrides
            var io = function(o){
                for(var m in o){
                    this[m] = o[m];
                }
            };
            return function(sb, sp, overrides){
                if(typeof sp == 'object'){
                    overrides = sp;
                    sp = sb;
                    sb = function(){sp.apply(this, arguments);};
                }
                var F = function(){}, sbp, spp = sp.prototype;
                F.prototype = spp;
                sbp = sb.prototype = new F();
                sbp.constructor=sb;
                sb.superclass=spp;
                if(spp.constructor == Object.prototype.constructor){
                    spp.constructor=sp;
                }
                sb.override = function(o){
                    Ext.override(sb, o);
                };
                sbp.override = io;
                Ext.override(sb, overrides);
                return sb;
            };
        } ()
---------------------------
1 extend : function(){}(),我想问一下为什么在ext类中extend方法后面有().
2 return function(sb, sp, overrides){}我对这种写法不太理解.
而Doc extend( Object subclass, Object superclass, [Object overrides]) 为什么这里 extend : function(){} 没有参数在return的funtion带参数这样写的作用是什么呢。
我的技术不太强,如果问的问题太弱请不要介意,有会的兄弟帮忙解答一下。

你可能感兴趣的:(JavaScript,F#,prototype,Scheme,ext)