Skip to content

Commit 47519bd

Browse files
committed
Merge pull request GitbookIO#64 from djpowers/patch-1
Fix spelling/grammar mistakes on Prototype section
2 parents 7654944 + 0cf9ee8 commit 47519bd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

objects/prototype.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ To set your own object as a prototype instead of the default Object.prototype, y
3030

3131
```js
3232
var child = Object.create(adult);
33-
/* This way of creating objects lets us easly replace the default Object.prototype with the one we want. In this case, the child's prototype is the adult object. */
33+
/* This way of creating objects lets us easily replace the default Object.prototype with the one we want. In this case, the child's prototype is the adult object. */
3434
child.age = 8;
3535
/* Previously, child didn't have its own age property, and the interpreter had to look further to the child's prototype to find it.
36-
Now, when we set the child's own age, the interpereter will not go further.
36+
Now, when we set the child's own age, the interpreter will not go further.
3737
Note: adult's age is still 26. */
3838
var stringRepresentation = child.toString();
3939
// The value is "I'm 8".
40-
/* Note: we have not overrided the child's toString property, thus the adult's method will be invoked. If adult did not have toString property, then Object.prototype's toString method would be invoked, and we would get "[object Object]" instead of "I'm 8" */
40+
/* Note: we have not overridden the child's toString property, thus the adult's method will be invoked. If adult did not have toString property, then Object.prototype's toString method would be invoked, and we would get "[object Object]" instead of "I'm 8" */
4141
```
4242

4343
`child`'s prototype is `adult`, whose prototype is `Object.prototype`. This sequence of prototypes is called **prototype chain**.

0 commit comments

Comments
 (0)