摘要:
3种定义方式: function a(x){ //方式1 return xx; } var b=function(x){ //方式2 return xx; } var c=new Function('x','return xx;'); //方式3要比较不同点当然要首先来看一下他们的构造函数有什么区别//都是function类型console.log(typeof a); //functionconsole.log(typeof b); //functionconsole.log(typeof c); //function//都是... 阅读全文
摘要:
Object-----------function Object() { [native code] } //Object对象Object //Object.prototype__defineGetter__:function __defineGetter__() { [native code] }__defineSetter__:function __defineSetter__() { [native code] }__lookupGetter__:function __lookupGetter__() { [native code] }__lookupSetter__:function 阅读全文