mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-29 06:26:22 +00:00
301 B
301 B
id | title |
---|---|
b7bd3cef-b42a-4f96-8e4c-b0c75c1e86e3 | Object.assign |
Description
Object.assign
copies all properties from one
object into another
Syntax
let objectA = { a: 1, b: 2 };
Object.assign(objectA, { b: 3, c: 4 });
console.log(objectA);