Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 101f8ba

Browse files
committed
closes #440
1 parent 8d69ef1 commit 101f8ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ That can become a source of bugs and even vulnerabilies if we intent to store ar
224224
225225
In that case the visitor may choose "__proto__" as the key, and the assignment logic will be ruined (as shown above).
226226
227-
There is a way to make objects treat `__proto__` as a regular property, which we'll cover later, but first we need to know more about objects.
227+
There is a way to make objects treat `__proto__` as a regular property, which we'll cover later, but first we need to know more about objects.
228228
There's also 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.
229229
````
230230

@@ -701,7 +701,7 @@ alert(clone.sizes.width); // 51, see the result from the other one
701701
702702
To fix that, we should use the cloning loop that examines each value of `user[key]` and, if it's an object, then replicate its structure as well. That is called a "deep cloning".
703703
704-
There's a standard algorithm for deep cloning that handles the case above and more complex cases, called the [Structured cloning algorithm](https://w3c.github.io/html/infrastructure.html#internal-structured-cloning-algorithm). In order not to reinvent the wheel, we can use a working implementation of it from the JavaScript library [lodash](https://lodash.com), the method is called [_.cloneDeep(obj)](https://lodash.com/docs#cloneDeep).
704+
There's a standard algorithm for deep cloning that handles the case above and more complex cases, called the [Structured cloning algorithm](http://w3c.github.io/html/infrastructure.html#safe-passing-of-structured-data). In order not to reinvent the wheel, we can use a working implementation of it from the JavaScript library [lodash](https://lodash.com), the method is called [_.cloneDeep(obj)](https://lodash.com/docs#cloneDeep).
705705
706706
707707

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /