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