Description: This method creates a shallow copy of an object, meaning that nested objects are not cloned but referenced.
Example:
const original = {
name: 'Max',
age: 6,
color: 'black'
};
const copy = Object.assign({}, original);
console.log(copy); // Output: { name: 'Max', age: 6, color: 'black' }
copy.name = 'Maxwell';
console.log(original.name); // Output: 'Max' (original object is not affected)