To inherit the properties of one object from another when working with JavaScript objects, I often see a use _.clonewhere there was an intention to create an object with other properties of the object, and then it will be expanded.
Why can't we use _.extend, which is more important for expanding an object?
Please tell me the difference between the two and why we cannot _.extendinstead _.clone, which is an expensive operation.
source
share