mirror of
https://github.com/alrayyes/wiki.git
synced 2024-12-01 15:26:23 +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);
|
||
|
```
|