Merge pull request #1754 from rizkyzhang/patch-2

Update article.md
This commit is contained in:
Ilya Kantor 2020-02-18 23:51:32 +00:00 committed by GitHub
commit 323f1552ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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).
Later we'll see 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).
2. There's also study another data structure [Map](info:map-set) in the chapter <info:map-set>, which supports arbitrary keys.
There are two workarounds for the problem:
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. 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