Skip to content

Commit 7d6e458

Browse files
committed
objects-classes, ch2: minor updates
2 parents f44ffc5 + e1c033d commit 7d6e458

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

objects-classes/ch2.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ myObj = {
284284
};
285285
```
286286

287-
That should look familiar from Chapter 1. But what you *don't see* in this code is that the object there was automatically linked to (via its internal `[[Prototype]]`) to that automatically built-in, but weirdly named, `Object.prototype` object.
287+
That should look familiar from Chapter 1. But what you *don't see* in this code is that the object there was automatically linked (via its internal `[[Prototype]]`) to that automatically built-in, but weirdly named, `Object.prototype` object.
288288

289289
When we do things like:
290290

@@ -362,13 +362,13 @@ It can be quite useful to create an object with no `[[Prototype]]` linkage to `O
362362

363363
Moreover, an object with an empty `[[Prototype]]` is safe from any accidental "inheritance" collision between its own property names and the ones it "inherits" from elsewhere. These types of (useful!) objects are sometimes referred to in popular parlance as "dictionary objects".
364364

365-
### `[[Prototype]]` vs `.prototype`
365+
### `[[Prototype]]` vs `prototype`
366366

367367
Notice that public property name `prototype` in the name/location of this special object, `Object.prototype`? What's that all about?
368368

369369
`Object` is the `Object(..)` function; by default, all functions (which are objects!) have such a `prototype` property on them, pointing at an object.
370370

371-
Any here's where the name conflict between `[[Prototype]]` and `.prototype` really bites us. The `prototype` property on a function doesn't define any linkage that the function itself experiences. Indeed, functions (as objects) have their own internal `[[Prototype]]` linkage somewhere else -- more on that in a second.
371+
Any here's where the name conflict between `[[Prototype]]` and `prototype` really bites us. The `prototype` property on a function doesn't define any linkage that the function itself experiences. Indeed, functions (as objects) have their own internal `[[Prototype]]` linkage somewhere else -- more on that in a second.
372372

373373
Rather, the `prototype` property on a function refers to an object that should be *linked to* by any other object that is created when calling that function with the `new` keyword:
374374

0 commit comments

Comments
 (0)