Shallow Copy means creating new references to the primitive values inside the object, copying them. A shallow copy refers to the fact that only one level is copied, and that will work fine for an array or object containing only primitive values. For objects and arrays containing other objects or arrays, copying these objects requires a deep copy. Changes made to be nested references will change the data nested in the original object or array.
1 Comment
Sort: