Skip to content

Commit 0502d6c

Browse files
authored
fix: 优化翻译
1 parent 64447ed commit 0502d6c

File tree

1 file changed

+4
-4
lines changed
  • 1-js/08-prototypes/02-function-prototype

1 file changed

+4
-4
lines changed

1-js/08-prototypes/02-function-prototype/article.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ alert( rabbit.eats ); // true
5757
```js
5858
function Rabbit() {}
5959
60-
/* default prototype
60+
/* 默认的 prototype
6161
Rabbit.prototype = { constructor: Rabbit };
6262
*/
6363
```
@@ -68,7 +68,7 @@ Rabbit.prototype = { constructor: Rabbit };
6868

6969
```js run
7070
function Rabbit() {}
71-
// by default:
71+
// 默认:
7272
// Rabbit.prototype = { constructor: Rabbit }
7373

7474
alert( Rabbit.prototype.constructor == Rabbit ); // true
@@ -78,10 +78,10 @@ alert( Rabbit.prototype.constructor == Rabbit ); // true
7878

7979
```js run
8080
function Rabbit() {}
81-
// by default:
81+
// 默认:
8282
// Rabbit.prototype = { constructor: Rabbit }
8383

84-
let rabbit = new Rabbit(); // inherits from {constructor: Rabbit}
84+
let rabbit = new Rabbit(); // 继承自 {constructor: Rabbit}
8585

8686
alert(rabbit.constructor == Rabbit); // true (from prototype)
8787
```

0 commit comments

Comments
 (0)