Skip to content

Commit 13bef41

Browse files
authored
Merge pull request #1359 from paroche/patch-43
Update article.md
2 parents 851acfc + adf7fb4 commit 13bef41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

1-js/08-prototypes/04-prototype-methods/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Why was `__proto__` replaced by the functions `getPrototypeOf/setPrototypeOf`? T
8282
```warn header="Don't change `[[Prototype]]` on existing objects if speed matters"
8383
Technically, we can get/set `[[Prototype]]` at any time. But usually we only set it once at the object creation time, and then do not modify: `rabbit` inherits from `animal`, and that is not going to change.
8484

85-
And JavaScript engines are highly optimized to that. Changing a prototype "on-the-fly" with `Object.setPrototypeOf` or `obj.__proto__=` is a very slow operation, it breaks internal optimizations for object property access operations. So avoid it unless you know what you're doing, or JavaScript speed totally doesn't matter for you.
85+
And JavaScript engines are highly optimized for this. Changing a prototype "on-the-fly" with `Object.setPrototypeOf` or `obj.__proto__=` is a very slow operation, it breaks internal optimizations for object property access operations. So avoid it unless you know what you're doing, or JavaScript speed totally doesn't matter for you.
8686
```
8787
8888
## "Very plain" objects [#very-plain]

0 commit comments

Comments
 (0)