From 4a2a86ee85a0cea658c6191ab78fbd05fcb1a342 Mon Sep 17 00:00:00 2001 From: Kurczok Date: Mon, 4 Sep 2017 00:08:02 +0200 Subject: [PATCH] removed => removing --- 1-js/04-object-basics/01-object/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/04-object-basics/01-object/article.md b/1-js/04-object-basics/01-object/article.md index aac55fe5..ce86f7fb 100644 --- a/1-js/04-object-basics/01-object/article.md +++ b/1-js/04-object-basics/01-object/article.md @@ -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).