Skip to content

Commit c4b1a40

Browse files
authored
Merge pull request #1340 from paroche/patch-31
Update article.md
2 parents 42244df + 5138c58 commit c4b1a40

File tree

1 file changed

+2
-2
lines changed
  • 1-js/08-prototypes/01-prototype-inheritance

1 file changed

+2
-2
lines changed

1-js/08-prototypes/01-prototype-inheritance/article.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,6 @@ They only operate on the object itself. Properties from the prototype are *not*
324324
- We can use `obj.__proto__` to access it (a historical getter/setter, there are other ways, to be covered soon).
325325
- The object referenced by `[[Prototype]]` is called a "prototype".
326326
- If we want to read a property of `obj` or call a method, and it doesn't exist, then JavaScript tries to find it in the prototype.
327-
- Write/delete operations for act directly on the object, they don't use the prototype (assuming it's a data property, not is a setter).
327+
- Write/delete operations act directly on the object, they don't use the prototype (assuming it's a data property, not a setter).
328328
- If we call `obj.method()`, and the `method` is taken from the prototype, `this` still references `obj`. So methods always work with the current object even if they are inherited.
329-
- The `for..in` loop iterates over both own and inherited properties. All other key/value-getting methods only operate on the object itself.
329+
- The `for..in` loop iterates over both its own and its inherited properties. All other key/value-getting methods only operate on the object itself.

0 commit comments

Comments
 (0)