We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 15c0126 commit fb600ccCopy full SHA for fb600cc
1 file changed
1-js/08-prototypes/02-function-prototype/1-changing-prototype/solution.md
@@ -6,12 +6,15 @@
6
`Rabbit.prototype` 的赋值操作为新对象设置了 `[[Prototype]]`,但它不影响已有的对象。
7
8
2. `false`。
9
+
10
对象通过引用被赋值。来自 `Rabbit.prototype` 的对象并没有被复制,它仍然是被 `Rabbit.prototype` 和 `rabbit` 的 `[[Prototype]]` 引用的单个对象。
11
12
所以当我们通过一个引用更改其内容时,它对其他引用也是可见的。
13
14
3. `true`。
15
16
所有 `delete` 操作都直接应用于对象。这里的 `delete rabbit.eats` 试图从 `rabbit` 中删除 `eats` 属性,但 `rabbit` 对象并没有 `eats` 属性。所以这个操作不会有任何影响。
17
18
4. `undefined`。
19
20
属性 `eats` 被从 prototype 中删除,prototype 中就没有这个属性了。
0 commit comments