minor fixes
This commit is contained in:
parent
19bf2d3f5a
commit
3fa4c32e1d
7 changed files with 32 additions and 23 deletions
|
@ -186,6 +186,8 @@ let clone = Object.assign({}, user);
|
|||
|
||||
It copies all properties of `user` into the empty object and returns it.
|
||||
|
||||
There are also other methods of cloning an object, e.g. using the [spread operator](info:rest-parameters-spread) `clone = {...user}`, covered later in the tutorial.
|
||||
|
||||
## Nested cloning
|
||||
|
||||
Until now we assumed that all properties of `user` are primitive. But properties can be references to other objects. What to do with them?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue