Travis build: 2050

This commit is contained in:
30secondsofcode
2018-05-11 09:46:16 +00:00
parent 7c2b5ce7bd
commit 50e3be73af
3 changed files with 2 additions and 8 deletions

View File

@ -7,8 +7,6 @@ Use `Object.assign()` and an empty object (`{}`) to create a shallow clone of th
Use `Object.keys()` and `Array.forEach()` to determine which key-value pairs need to be deep cloned.
```js
const deepClone = obj => {
let clone = Object.assign({}, obj);
Object.keys(clone).forEach(
@ -19,10 +17,6 @@ const deepClone = obj => {
```
```js
const a = { foo: 'bar', obj: { a: 1, b: 2 } };
const b = deepClone(a); // a !== b, a.obj !== b.obj
```