Skip to content

Commit 1dce5b7

Browse files
authored
Merge pull request #3815 from Gleb-Pastushenko/patch-6
Update article.md
2 parents 6236eb8 + 011dd4f commit 1dce5b7

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

+1-1
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)