Skip to content

Commit ed0e64b

Browse files
committed
minor
1 parent 5b16f00 commit ed0e64b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

1-js/04-object-basics/01-object/article.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,12 @@ alert(obj.__proto__); // [object Object], didn't work as intended
224224
225225
As we see from the code, the assignment to a primitive `5` is ignored.
226226
227-
That can be come a source of bugs and even vulnerabilies if we intent to store arbitrary key-value pairs in an object, and allow a visitor to specify the keys. In that case the visitor may choose "__proto__" as the key, and the assignment logic will be ruined (as shown above).
227+
That can become a source of bugs and even vulnerabilies if we intent to store arbitrary key-value pairs in an object, and allow a visitor to specify the keys.
228228
229-
There's another data structure [Map](info:map-set-weakmap-weakset), that we'll learn in the chapter <info:map-set-weakmap-weakset>, which supports arbitrary keys. Also there's a way to make objects treat `__proto__` as a regular property, but first we need to know more about objects to understand it.
229+
In that case the visitor may choose "__proto__" as the key, and the assignment logic will be ruined (as shown above).
230+
231+
There exist a way to make objects treat `__proto__` as a regular property, we'll cover it later, but first we need to know more about objects to understand it.
232+
There's another data structure [Map](info:map-set-weakmap-weakset), that we'll learn in the chapter <info:map-set-weakmap-weakset>, which supports arbitrary keys. Also
230233
````
231234

232235

0 commit comments

Comments
 (0)