chore(i8n,learn): processed translations

This commit is contained in:
Crowdin Bot
2021-02-06 04:42:36 +00:00
committed by Mrugesh Mohapatra
parent 15047f2d90
commit e5c44a3ae5
3274 changed files with 172122 additions and 14164 deletions

View File

@ -1,50 +1,51 @@
---
id: 596a8888ab7c01048de257d5
title: deepcopy
title: Deepcopy
challengeType: 5
videoUrl: ''
forumTopicId: 302247
dashedName: deepcopy
---
# --description--
任务:
Write a function that returns a deep copy of a given object. The copy must not be the same object that was given.
编写一个返回给定对象的深层副本的函数。
This task will not test for:
副本不得与给定的对象相同。
此任务不会测试:
具有属性属性的对象Date对象或具有Date对象属性的对象RegEx或具有RegEx对象属性的对象原型复制
<ul>
<li>Objects with properties that are functions</li>
<li>Date objects or object with properties that are Date objects</li>
<li>RegEx or object with properties that are RegEx objects</li>
<li>Prototype copying</li>
</ul>
# --hints--
`deepcopy`应该是一个功能。
`deepcopy` should be a function.
```js
assert(typeof deepcopy === 'function');
```
`deepcopy({test: "test"})`应返回一个对象。
`deepcopy({test: "test"})` should return an object.
```js
assert(typeof deepcopy(obj1) === 'object');
```
不应该返回提供的相同对象。
`deepcopy` should not return the same object that was provided.
```js
assert(deepcopy(obj2) != obj2);
```
传递包含数组的对象时,应返回该对象的深层副本。
When passed an object containing an array, `deepcopy` should return a deep copy of the object.
```js
assert.deepEqual(deepcopy(obj2), obj2);
```
传递包含另一个对象的对象时,应返回该对象的深层副本。
When passed an object containing another object, `deepcopy` should return a deep copy of the object.
```js
assert.deepEqual(deepcopy(obj3), obj3);