We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
构造函数的prototype属性指向的对象就是原型对象。每个实例对象的__proto__属性也指向该对象的原型(父对象)。 原型对象中可以设置用该构造函数创建的实例对象共同拥有的属性和方法。
Object.__proto__ === Function.prototype; Function.prototype.__proto__ === Object.prototype; Object.prototype.__proto__ === null;
原型链:访问实例化对象的属性时会触发get方法,它会先在自身属性上查找,如果没有这个属性,就会去__proto__指向的父对象中查找,一层层向上直到查找到顶层对象Object,这个查找的过程就是原型链
The text was updated successfully, but these errors were encountered:
No branches or pull requests
构造函数的prototype属性指向的对象就是原型对象。每个实例对象的__proto__属性也指向该对象的原型(父对象)。
原型对象中可以设置用该构造函数创建的实例对象共同拥有的属性和方法。
原型链:访问实例化对象的属性时会触发get方法,它会先在自身属性上查找,如果没有这个属性,就会去__proto__指向的父对象中查找,一层层向上直到查找到顶层对象Object,这个查找的过程就是原型链
The text was updated successfully, but these errors were encountered: