Object Spread ES9
Spread operator(...
) copies own enumerable properties of an object to a new object.
const obj = { name: "Backbencher", topic: "JavaScript" };
const objCopy = { ...obj };
console.log(objCopy);
/* OUTPUT:
{
name: "Backbencher",
topic: "JavaScript"
}
*/