commit
323f1552ac
1 changed files with 3 additions and 3 deletions
|
@ -301,9 +301,9 @@ As for now, it's important to know that such behavior of `__proto__` can become
|
||||||
|
|
||||||
The problem is that a visitor may choose `__proto__` as the key, and the assignment logic will be ruined (as shown above).
|
The problem is that a visitor may choose `__proto__` as the key, and the assignment logic will be ruined (as shown above).
|
||||||
|
|
||||||
Later we'll see workarounds for the problem:
|
There are two workarounds for the problem:
|
||||||
1. We'll see how to make an objects treat `__proto__` as a regular property in the chapter [](info:prototype-methods).
|
1. Modify the object's behavior to treat `__proto__` as a regular property. We'll learn how to do it in the chapter [](info:prototype-methods).
|
||||||
2. There's also study another data structure [Map](info:map-set) in the chapter <info:map-set>, which supports arbitrary keys.
|
2. Using [Map](info:map-set) data structure which supports arbitrary keys. We'll learn it in the chapter <info:map-set>.
|
||||||
|
|
||||||
## Property existence test, "in" operator
|
## Property existence test, "in" operator
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue