Object.assign() JavaScript
The Javascript Object assign() method copies enumerable and own properties from a source object to a target object. The whole operation (assignment and copy) is done by reference. Syntax: Object.assign(target, sources) Parameters: target: It represents the target object. source: It represents the source object. Return: It returns the target object. Example: <!DOCTYPE html> <html> <body> … Read more