Similar to Object.assign but will avoid replacing existing values of object type. Only primitives and nested primitives are assigned.
Object.assign
object
A getter function may be used to retrieve existing target properties in cases where we want some indirection.
Optional
Copy
Similar to
Object.assignbut will avoid replacing existing values ofobjecttype. Only primitives and nested primitives are assigned.A getter function may be used to retrieve existing target properties in cases where we want some indirection.