mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-22 03:26:22 +00:00
318 B
318 B
date | id | title |
---|---|---|
2020-11-13 | 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);