Skip to content

Commit f036efc

Browse files
committed
update
1 parent 6542294 commit f036efc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

OO/createObject.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@
7272
// console.log(Object.getPrototypeOf(person1) == Person.prototype); //ES5方法 true
7373

7474
//原型模式问题
75-
//每个实例共享属性和方法,若一个实例更改引用类型属性,所有实例该属性均会被改变。
75+
//1. 每个实例共享属性和方法,若一个实例更改引用类型属性,所有实例该属性均会被改变。
76+
//2. 不能传参
7677
//指针[[Prototype]]存在于实例与构造函数的原型对象之间,在 Firefox、Safari 和 Chrome 在可以通过 __proto__ 访问。
7778

7879
// console.log(person1.hasOwnProperty('name'));

0 commit comments

Comments
 (0)