2021年5月29日
摘要: function Person(name,age){ this.name = name; this.age = age; } var person1 = new Person('jay',24); console.log(person1.prototype); //undefined console 阅读全文
posted @ 2021-05-29 14:36 皮杰克 阅读(49) 评论(0) 推荐(0) 编辑
摘要: 1.创建新对象 2.将this绑定到该对象 3.执行构造函数代码,将属性绑定到新对象 4.返回该对象 注意:新对象的__proto__要指向构造函数的prototype 阅读全文
posted @ 2021-05-29 11:37 皮杰克 阅读(50) 评论(0) 推荐(0) 编辑