Skip to content

Commit 8f45af7

Browse files
vsemozhetbytbevacqua
authored andcommitted
ch03: fix typos in Object.assign() section (#62)
1 parent 0c1a5fa commit 8f45af7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ch03.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ console.log(Object.assign({}, defaults, options))
755755

756756
Note, however, that `Object.assign` doesn't cater to every need. While most user-land implementations have the ability to perform deep assignment, `Object.assign` doesn't offer a recursive treatment of objects. Object values are assigned as properties on `target` directly, instead of being recursively assigned key by key.
757757

758-
In the following bit of code you might expect the `f` property to be added to `target.a` while keeping `b.c` and `b.d` intact, but the `b.c` and `b.d` properties are lost when using `Object.assign`.
758+
In the following bit of code you might expect the `f` property to be added to `target.a` while keeping `a.b` and `a.d` intact, but the `a.b` and `a.d` properties are lost when using `Object.assign`.
759759

760760
[source,javascript]
761761
----

0 commit comments

Comments
 (0)