这下面是我对整个 js 中对象的认识图 ,不知道队不对:
null;
function Object(){
this.prototype={
constructor:null,
};
this.__proto__=this.prototype;
};
function Function(){
this.prototype={
constructor:Object.prototype,
};
this.__proto__=this.prototype,
};
function Arry(){
this.prototype={
constructor:Function.prototype,
};
this.__proto__=this.prototype;
};
在此我还想请教下 js中 new的内部作用原理
简单来说,new操作符执行两个动作:1.实例化一个object类。2.以这个object为上下文执行new后面的函数。就这么简单。