removed => removing
This commit is contained in:
parent
b11dd79e5e
commit
4a2a86ee85
1 changed files with 1 additions and 1 deletions
|
@ -719,7 +719,7 @@ Additional operators:
|
|||
- To check if a property with the given key exists: `"key" in obj`.
|
||||
- To iterate over an object: `for(let key in obj)` loop.
|
||||
|
||||
Objects are assigned and copied by reference. In other words, a variable stores not the "object value", but a "reference" (address in memory) for the value. So copying such a variable or passing it as a function argument copies that reference, not the object. All operations via copied references (like adding/removed properties) are performed on the same single object.
|
||||
Objects are assigned and copied by reference. In other words, a variable stores not the "object value", but a "reference" (address in memory) for the value. So copying such a variable or passing it as a function argument copies that reference, not the object. All operations via copied references (like adding/removing properties) are performed on the same single object.
|
||||
|
||||
To make a "real copy" (a clone) we can use `Object.assign` or [_.cloneDeep(obj)](https://lodash.com/docs#cloneDeep).
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue