Skip to content

Commit fb600cc

Browse files
authored
fix typo
1 parent 15c0126 commit fb600cc

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • 1-js/08-prototypes/02-function-prototype/1-changing-prototype

1-js/08-prototypes/02-function-prototype/1-changing-prototype/solution.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@
66
`Rabbit.prototype` 的赋值操作为新对象设置了 `[[Prototype]]`,但它不影响已有的对象。
77

88
2. `false`
9+
910
对象通过引用被赋值。来自 `Rabbit.prototype` 的对象并没有被复制,它仍然是被 `Rabbit.prototype``rabbit``[[Prototype]]` 引用的单个对象。
1011

1112
所以当我们通过一个引用更改其内容时,它对其他引用也是可见的。
1213

1314
3. `true`
15+
1416
所有 `delete` 操作都直接应用于对象。这里的 `delete rabbit.eats` 试图从 `rabbit` 中删除 `eats` 属性,但 `rabbit` 对象并没有 `eats` 属性。所以这个操作不会有任何影响。
1517

1618
4. `undefined`
19+
1720
属性 `eats` 被从 prototype 中删除,prototype 中就没有这个属性了。

0 commit comments

Comments
 (0)