Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 566b387

Browse files
zouxYuChengKai
authored and
YuChengKai
committed
complement descriptions of deep clone
1 parent 590c82e commit 566b387

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

‎JS/JS-br.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,7 @@ console.log(b.jobs.first) // FE
577577
578578
But this method also has its limits:
579579
* ignore `undefined`
580+
* ignore `symbol`
580581
* unable to serialize function
581582
* unable to resolve circular references in an object
582583
```js
@@ -600,10 +601,11 @@ If an object is circularly referenced like the above example, you’ll find the
600601
601602
![](https://user-gold-cdn.xitu.io/2018/3/28/1626b1ec2d3f9e41?w=840&h=100&f=png&s=30123)
602603
603-
When dealing with functionor `undefined`, the object can also not be serialized properly.
604+
When dealing with function, `undefined`or `symbol`, the object can also not be serialized properly.
604605
```js
605606
let a = {
606607
age: undefined,
608+
sex: Symbol('male'),
607609
jobs: function() {},
608610
name: 'yck'
609611
}

‎JS/JS-ch.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,7 @@ console.log(b.jobs.first) // FE
615615
但是该方法也是有局限性的:
616616

617617
- 会忽略 `undefined`
618+
- 会忽略 `symbol`
618619
- 不能序列化函数
619620
- 不能解决循环引用的对象
620621

@@ -639,11 +640,12 @@ console.log(newObj)
639640

640641
![](https://user-gold-cdn.xitu.io/2018/3/28/1626b1ec2d3f9e41?w=840&h=100&f=png&s=30123)
641642

642-
在遇到函数或者 `undefined` 的时候,该对象也不能正常的序列化
643+
在遇到函数、 `undefined` 或者 `symbol` 的时候,该对象也不能正常的序列化
643644

644645
```js
645646
let a = {
646647
age: undefined,
648+
sex: Symbol('male'),
647649
jobs: function() {},
648650
name: 'yck'
649651
}

‎JS/JS-en.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,7 @@ console.log(b.jobs.first) // FE
577577
578578
But this method also has its limits:
579579
* ignore `undefined`
580+
* ignore `symbol`
580581
* unable to serialize function
581582
* unable to resolve circular references in an object
582583
```js
@@ -600,10 +601,11 @@ If an object is circularly referenced like the above example, you’ll find the
600601
601602
![](https://user-gold-cdn.xitu.io/2018/3/28/1626b1ec2d3f9e41?w=840&h=100&f=png&s=30123)
602603
603-
When dealing with functionor `undefined`, the object can also not be serialized properly.
604+
When dealing with function, `undefined`or `symbol`, the object can also not be serialized properly.
604605
```js
605606
let a = {
606607
age: undefined,
608+
sex: Symbol('male'),
607609
jobs: function() {},
608610
name: 'yck'
609611
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /