Skip to content

Commit 686c011

Browse files
committed
Merge branch 'master' of github.com:javascript-tutorial/en.javascript.info into sync-1dce5b72
2 parents 88201de + 1dce5b7 commit 686c011

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
@@ -116,7 +116,7 @@ alert(obj[key]); // [object Object], not "some value"!
116116

117117
Here, if the user types in `__proto__`, the assignment in line 4 is ignored!
118118

119-
That could surely be surprising for a non-developer, but pretty understandable for us. The `__proto__` property is special: it must be either an object or `null`. A string can not become a prototype. That's why an assignment a string to `__proto__` is ignored.
119+
That could surely be surprising for a non-developer, but pretty understandable for us. The `__proto__` property is special: it must be either an object or `null`. A string can not become a prototype. That's why assigning a string to `__proto__` is ignored.
120120

121121
But we didn't *intend* to implement such behavior, right? We want to store key/value pairs, and the key named `"__proto__"` was not properly saved. So that's a bug!
122122

0 commit comments

Comments
 (0)