Skip to content

Commit dc98a49

Browse files
committed
Text tweaks
1 parent 7ede7c0 commit dc98a49

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • src/week3/7-oop/traversy_oop_crash_course

‎src/week3/7-oop/traversy_oop_crash_course/README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ Firstly, remember that when a function is called with `new`, its `this` value is
158158

159159
In order to initialize the base object (in this example **Book**), its constructor function must be called, with the `this` value set to that of the calling constructor (here, **Magazine**).
160160

161-
This is done with the `Function.prototype.call()` method (see Figure 4 below), passing the `this` value of the calling constructor as its first argument. If the called constructor expects arguments they are passed as additional arguments following the `this` value. In this example, the called constructor for **Book** expects the arguments `title`, `author` and `year`.
161+
This is done with the [Function.prototype.call()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call) method (see Figure 4 below), passing the `this` value of the calling constructor as its first argument. If the called constructor expects arguments they are passed as additional arguments following the `this` value. In this example, the called constructor for **Book** expects the arguments `title`, `author` and `year`.
162162

163163
```js
164164
function Magazine(title, author, year, month) {
@@ -167,7 +167,7 @@ function Magazine(title, author, year, month) {
167167
}
168168
```
169169

170-
Next, the prototype of the calling constructor must be linked to the called constructor. This is done with the help of [`Object.create`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create).
170+
Next, the prototype of the calling constructor must be linked to the called constructor. This is done with the help of [Object.create()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create).
171171

172172
```js
173173
Magazine.prototype = Object.create(Book.prototype);

0 commit comments

Comments
 (0)