目录
1、示例代码
- 1、示例代码
- 2、注解
function Student(params) { this.params = params; } let student = new Student('159357'); console.log(student.__proto__ === Student.prototype); // true console.log(student.constructor === Student); // true console.log(Student.prototype.constructor === Student); // true2、注解
1、实例的__proto__全等于函数的原型对象。 2、实例的构造函数全等于函数本身。 3、函数的原型对象的构造函数全等于函数本身。