You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1-js/04-object-basics/01-object/article.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -220,7 +220,7 @@ alert(obj.__proto__); // [object Object], didn't work as intended
220
220
221
221
As we see from the code, the assignment to a primitive `5` is ignored.
222
222
223
-
That can become a source of bugs and even vulnerabilies if we intend to store arbitrary key-value pairs in an object, and allow a visitor to specify the keys.
223
+
That can become a source of bugs and even vulnerabilities if we intend to store arbitrary key-value pairs in an object, and allow a visitor to specify the keys.
224
224
225
225
In that case the visitor may choose "__proto__" as the key, and the assignment logic will be ruined (as shown above).
0 commit comments