Shallow Copy
A new collection that still shares the items inside it with the original.
What is Shallow Copy in JavaScript?
Shallow Copy — A new collection that still shares the items inside it with the original.
const order = { item: "tea", quantity: 1 };
const updatedOrder = { ...order, quantity: 2 };
Level: Freelancer · More JavaScript terms at this level
Updated