` containing the info returned by the call to the DOM. Here is an example of how to interact with this form:
+在 HTML 主视图中有一个输入表格。 它发送数据到 `PUT /travellers` 端点,我们在上面的 Ajax 请求中使用。 当请求成功完成时,客户端代码会给 DOM 增加一个包含调用返回信息的 `
`。 下面的例子展示了如何使用这个表格:
```js
test('#test - submit the input "surname" : "Polo"', function (done) {
@@ -24,36 +24,36 @@ test('#test - submit the input "surname" : "Polo"', function (done) {
}
```
-First, the `fill` method of the `browser` object fills the `surname` field of the form with the value `'Polo'`. Immediately after, the `pressButton` method invokes the `submit` event listener of the form. The `pressButton` method is asynchronous.
+首先, `browser` 对象的 `fill` 方法在表格的 `surname` 字段中填入值 `'Polo'`。 紧接着,`pressButton` 方法调用表单的 `submit` 事件监听器。 `pressButton` 方法是异步的。
-Then, once a response is received from the AJAX request, a few assertions are made confirming:
+收到 AJAX 请求的响应之后,会有几项断言确认:
-1. The status of the response is `200`
-2. The text within the `` element matches `'Marco'`
-3. The text within the `` element matches `'Polo'`
-4. The there is `1` `` element.
+1. 响应状态是 `200`
+2. `` 元素的文本是 `'Marco'`
+3. `` 元素的文本是 `'Polo'`
+4. 有 `1` 个 `` 元素。
-Finally, the `done` callback is invoked, which is needed due to the asynchronous test.
+最后,执行 `done`,这是异步测试所必需的。
# --instructions--
-Within `tests/2_functional-tests.js`, in the `'submit "surname" : "Colombo" - write your e2e test...'` test (`// #5`), automate filling-in and submitting the form:
+在 `tests/2_functional-tests.js` 中,`'submit "surname" : "Colombo" - write your e2e test...'` 测试(`// #5`),自动化填入和提交表单:
-1. Fill in the form
-2. Submit it pressing `'submit'` button.
+1. 填写表单
+2. 点击 `'submit'` 按钮提交表单
-Within the callback:
+在回调中:
-1. assert that status is OK `200`
-2. assert that the text inside the element `span#name` is `'Cristoforo'`
-3. assert that the text inside the element `span#surname` is `'Colombo'`
-4. assert that the element(s) `span#dates` exist and their count is `1`
+1. 断言状态是正常的 `200`
+2. 断言元素 `span#name` 中的文本是 `'Cristoforo'`
+3. 断言元素 `span#surname` 元素中的文本是 `'Colombo'`
+4. 断言有 `span#dates` 元素,它们的计数是 `1`
-Do not forget to remove the `assert.fail()` call.
+不要忘记删除 `assert.fail()` 调用。
# --hints--
-All tests should pass.
+应通过所有测试。
```js
(getUserInput) =>
@@ -67,7 +67,7 @@ All tests should pass.
);
```
-You should assert that the headless browser request succeeded.
+应该断言无头浏览器请求成功。
```js
(getUserInput) =>
@@ -81,7 +81,7 @@ You should assert that the headless browser request succeeded.
);
```
-You should assert that the text inside the element 'span#name' is 'Cristoforo'.
+应该断言元素 “span#name” 中的文字为 “Cristoforo”。
```js
(getUserInput) =>
@@ -97,7 +97,7 @@ You should assert that the text inside the element 'span#name' is 'Cristoforo'.
);
```
-You should assert that the text inside the element 'span#surname' is 'Colombo'.
+应该断言元素 “span#surname” 中的文字为 “Colombo”。
```js
(getUserInput) =>
@@ -113,7 +113,7 @@ You should assert that the text inside the element 'span#surname' is 'Colombo'.
);
```
-You should assert that the element 'span#dates' exist and its count is 1.
+应该断言元素 “span#dates” 存在,且它的值为 1。
```js
(getUserInput) =>
diff --git a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/simulate-actions-using-a-headless-browser.md b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/simulate-actions-using-a-headless-browser.md
index c5a21227db..f288dba89b 100644
--- a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/simulate-actions-using-a-headless-browser.md
+++ b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/simulate-actions-using-a-headless-browser.md
@@ -1,45 +1,45 @@
---
id: 587d824f367417b2b2512c5c
-title: Simulate Actions Using a Headless Browser
+title: 使用无头浏览器模拟操作
challengeType: 2
dashedName: simulate-actions-using-a-headless-browser
---
# --description--
-As a reminder, this project is being built upon the following starter project on [Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-mochachai), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-mochachai/).
+请注意,本项目在[这个 Repl.it 项目](https://repl.it/github/freeCodeCamp/boilerplate-mochachai)的基础上进行开发。你也可以从 [GitHub](https://repl.it/github/freeCodeCamp/boilerplate-mochachai) 上克隆。
-In the next challenges we are going to simulate the human interaction with a page using a device called 'Headless Browser'.
+在接下来的挑战中,我们将使用名为 “Headless Browser(无头浏览器)” 的设备模拟人与页面的交互。
-A headless browser is a web browser without a graphical user interface. This kind of tool is particularly useful for testing web pages, as it is able to render and understand HTML, CSS, and JavaScript the same way a browser would.
+无头浏览器是没有图形用户界面的 Web 浏览器。 这种工具对于测试网页特别有用,因为它能够以与浏览器相同的方式呈现和理解 HTML、CSS 和 JavaScript。
-For these challenges we are using Zombie.JS. It's a lightweight browser which is totally based on JS, without relying on additional binaries to be installed. This feature makes it usable in an environment such as Repl.it. There are many other (more powerful) options.
+针对这些挑战,我们使用 Zombie.JS。 它是一个轻量级浏览器,完全基于 JS,而不需要额外的二进制文件来安装。 这个功能使我们可以在 Repl.it 等环境中使用它。 还有许多其他(更强大的)选择。
-Mocha allows you to prepare the ground running some code before the actual tests. This can be useful for example to create items in the database, which will be used in the successive tests.
+Mocha 允许你在实际测试之前准备一些代码运行的基础。 这可能有助于例如在数据库中创建项目,用于连续测试。
-With a headless browser, before the actual testing, we need to **visit** the page we are going to inspect. The `suiteSetup` 'hook' is executed only once at the suite startup. Other different hook types can be executed before each test, after each test, or at the end of a suite. See the Mocha docs for more information.
+使用无头浏览器,在进行实际测试之前,我们需要**访问**我们将要检查的页面。 `suiteSetup` “hook” 仅在套件启动时执行。 其他不同的钩子类型可以在每次测试之前、每次测试之后或者在套件的末尾执行。 更多信息请参阅 Mocha 文档。
# --instructions--
-Within `tests/2_functional-tests.js`, immediately after the `Browser` declaration, add your project URL to the `site` property of the variable:
+在 `tests/2_functional-tests.js`中,紧接着 `Browser` 声明之后,将你的项目 URL 添加到变量的 `site` 属性:
```js
Browser.site = 'https://sincere-cone.gomix.me'; // Your URL here
```
-If you are testing on a local environment replace the line above with
+如果你在本地环境中测试,则替换上面的代码为:
```js
Browser.localhost('example.com', process.env.PORT || 3000);
```
-Within `tests/2_functional-tests.js`, at the root level of the `'Functional Tests with Zombie.js'` suite, instantiate a new instance of the `Browser` object with the following code:
+在 `tests/2_functional-tests.js` 中,在 `'Functional Tests with Zombie.js'` 套件的底部,使用以下代码实例化一个新的 `Browser` 对象:
```js
const browser = new Browser();
```
-Then, use the `suiteSetup` hook to direct the `browser` to the `/` route with the following code:
+然后,通过以下代码,使用 `suiteSetup` 钩子把 `browser` 指向 `/` 路由:
```js
suiteSetup(function(done) {
@@ -49,7 +49,7 @@ suiteSetup(function(done) {
# --hints--
-All tests should pass.
+应通过所有测试。
```js
(getUserInput) =>
diff --git a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-for-truthiness.md b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-for-truthiness.md
index d06c838a5a..2bee3d9210 100644
--- a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-for-truthiness.md
+++ b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-for-truthiness.md
@@ -1,6 +1,6 @@
---
id: 587d824b367417b2b2512c49
-title: Test for Truthiness
+title: 测试真实性
challengeType: 2
forumTopicId: 301596
dashedName: test-for-truthiness
@@ -8,9 +8,9 @@ dashedName: test-for-truthiness
# --description--
-As a reminder, this project is being built upon the following starter project on [Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-mochachai), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-mochachai/).
+请注意,本项目在[这个 Repl.it 项目](https://repl.it/github/freeCodeCamp/boilerplate-mochachai)的基础上进行开发。你也可以从 [GitHub](https://repl.it/github/freeCodeCamp/boilerplate-mochachai) 上克隆。
-`isTrue()` will test for the boolean value `true` and `isNotTrue()` will pass when given anything but the boolean value of `true`.
+`isTrue()` 仅当给出的值为 Boolean 的 `true` 时可以通过测试;`isNotTrue()` 则会在给出除 `true` 以外的值时通过测试。
```js
assert.isTrue(true, 'this will pass with the boolean value true');
@@ -18,15 +18,15 @@ assert.isTrue('true', 'this will NOT pass with the string value "true"');
assert.isTrue(1, 'this will NOT pass with the number value 1');
```
-`isFalse()` and `isNotFalse()` also exist, and behave similarly to their true counterparts except they look for the boolean value of `false`.
+`isFalse()` 和 `isNotFalse()` 同样存在,与上面提到的两个方法类似,只不过它们针对值为 `false` 的布尔值。
# --instructions--
-Within `tests/1_unit-tests.js` under the test labelled `#4` in the `Basic Assertions` suite, change each `assert` to either `assert.isTrue` or `assert.isNotTrue` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts.
+在 `tests/1_unit-tests.js` 中,`Basic Assertions` 套件中标注为 `#4` 的测试下,修改每个 `assert` 为 `assert.isTrue` 或 `assert.isNotTrue`,通过测试(结果应为 `true`)。 不要修改传入断言的参数。
# --hints--
-All tests should pass.
+应通过所有测试。
```js
(getUserInput) =>
@@ -40,7 +40,7 @@ All tests should pass.
);
```
-You should choose the correct method for the first assertion - `isTrue` vs. `isNotTrue`.
+应该为第一个断言选择正确的方法:`isTrue` 或 `isNotTrue`。
```js
(getUserInput) =>
@@ -54,7 +54,7 @@ You should choose the correct method for the first assertion - `isTrue` vs. `isN
);
```
-You should choose the correct method for the second assertion - `isTrue` vs. `isNotTrue`.
+应该为第二个断言选择正确的方法:`isTrue` 或 `isNotTrue`。
```js
(getUserInput) =>
@@ -72,7 +72,7 @@ You should choose the correct method for the second assertion - `isTrue` vs. `is
);
```
-You should choose the correct method for the third assertion - `isTrue` vs. `isNotTrue`.
+应该为第三个断言选择正确的方法:`isTrue` 或 `isNotTrue`。
```js
(getUserInput) =>
diff --git a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-string-contains-a-substring.md b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-string-contains-a-substring.md
index 3db5ce9dab..45ccd4410d 100644
--- a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-string-contains-a-substring.md
+++ b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-string-contains-a-substring.md
@@ -1,6 +1,6 @@
---
id: 587d824d367417b2b2512c53
-title: Test if a String Contains a Substring
+title: 测试字符串是否包含子字符串
challengeType: 2
forumTopicId: 301597
dashedName: test-if-a-string-contains-a-substring
@@ -8,17 +8,17 @@ dashedName: test-if-a-string-contains-a-substring
# --description--
-As a reminder, this project is being built upon the following starter project on [Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-mochachai), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-mochachai/).
+请注意,本项目在[这个 Repl.it 项目](https://repl.it/github/freeCodeCamp/boilerplate-mochachai)的基础上进行开发。你也可以从 [GitHub](https://repl.it/github/freeCodeCamp/boilerplate-mochachai) 上克隆。
-`include()` and `notInclude()` work for strings too! `include()` asserts that the actual string contains the expected substring.
+`include()` 和 `notInclude()` 同样可以用于字符串。 `include()` 用于断言字符串中包含某个子字符串。
# --instructions--
-Within `tests/1_unit-tests.js` under the test labelled `#14` in the `Strings` suite, change each `assert` to either `assert.include` or `assert.notInclude` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts.
+在 `tests/1_unit-tests.js` 中,`Strings` 套件里标有 `#14` 的测试下,将每个 `assert` 改成 `assert.include` 或 `assert.notInclude` 方法,通过测试(结果应该返回 `true`)。 不要修改传给断言的参数。
# --hints--
-All tests should pass.
+应通过所有测试。
```js
(getUserInput) =>
@@ -32,7 +32,7 @@ All tests should pass.
);
```
-You should choose the correct method for the first assertion - `include` vs. `notInclude`.
+应该为第一个断言选择正确的方法:`include` 或 `notInclude`。
```js
(getUserInput) =>
@@ -50,7 +50,7 @@ You should choose the correct method for the first assertion - `include` vs. `no
);
```
-You should choose the correct method for the second assertion - `include` vs. `notInclude`.
+应该为第二个断言选择正确的方法:`include` 或 `notInclude`。
```js
(getUserInput) =>
diff --git a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-falls-within-a-specific-range.md b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-falls-within-a-specific-range.md
index 7ee2db2e83..b9b1766668 100644
--- a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-falls-within-a-specific-range.md
+++ b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-falls-within-a-specific-range.md
@@ -1,6 +1,6 @@
---
id: 587d824c367417b2b2512c4f
-title: Test if a Value Falls within a Specific Range
+title: 测试某个值是否在特定范围内
challengeType: 2
forumTopicId: 301598
dashedName: test-if-a-value-falls-within-a-specific-range
@@ -8,23 +8,23 @@ dashedName: test-if-a-value-falls-within-a-specific-range
# --description--
-As a reminder, this project is being built upon the following starter project on [Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-mochachai), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-mochachai/).
+请注意,本项目在 [这个 Repl.it 项目](https://repl.it/github/freeCodeCamp/boilerplate-mochachai) 的基础上进行开发。 你也可以从 [GitHub](https://repl.it/github/freeCodeCamp/boilerplate-mochachai) 上克隆。
```javascript
.approximately(actual, expected, delta, [message])
```
-Asserts that the `actual` is equal to `expected`, to within a +/- `delta` range.
+断言 `actual` 等于 `expected`,在 +/- `delta` 的范围内。
# --instructions--
-Within `tests/1_unit-tests.js` under the test labelled `#10` in the `Comparisons` suite, change each `assert` to `assert.approximately` to make the test pass (should evaluate to `true`).
+在 `tests/1_unit-tests.js` 中,在 `Comparisons` 套件里标有 `#10` 的测试中,将每个 `assert` 改成 `assert.approximately`,让测试通过(结果应该返回 `true`)。
-Choose the minimum range (3rd parameter) to make the test always pass. It should be less than 1.
+选择最小范围(第三个参数)来通过所有测试。 它应该小于 1。
# --hints--
-All tests should pass.
+不应有未通过的测试
```js
(getUserInput) =>
@@ -38,7 +38,7 @@ All tests should pass.
);
```
-You should choose the correct range for the first assertion - `approximately(actual, expected, range)`.
+应该为第一个断言选择正确的范围——`approximately(actual, expected, range)`。
```js
(getUserInput) =>
@@ -57,7 +57,7 @@ You should choose the correct range for the first assertion - `approximately(act
);
```
-You should choose the correct range for the second assertion - `approximately(actual, expected, range)`.
+应该为第二个断言选择正确的范围——`approximately(actual, expected, range)`。
```js
(getUserInput) =>
diff --git a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-is-a-string.md b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-is-a-string.md
index d51fae0ff7..6cc6c76f73 100644
--- a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-is-a-string.md
+++ b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-is-a-string.md
@@ -1,6 +1,6 @@
---
id: 587d824d367417b2b2512c52
-title: Test if a Value is a String
+title: 测试某个值是否为字符串
challengeType: 2
forumTopicId: 301599
dashedName: test-if-a-value-is-a-string
@@ -8,17 +8,17 @@ dashedName: test-if-a-value-is-a-string
# --description--
-As a reminder, this project is being built upon the following starter project on [Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-mochachai), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-mochachai/).
+请注意,本项目在[这个 Repl.it 项目](https://repl.it/github/freeCodeCamp/boilerplate-mochachai)的基础上进行开发。你也可以从 [GitHub](https://repl.it/github/freeCodeCamp/boilerplate-mochachai) 上克隆。
-`isString` or `isNotString` asserts that the actual value is a string.
+`isString` 或 `isNotString` 断言一个值是否为字符串。
# --instructions--
-Within `tests/1_unit-tests.js` under the test labelled `#13` in the `Strings` suite, change each `assert` to either `assert.isString` or `assert.isNotString` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts.
+在 `tests/1_unit-tests.js` 中,`Strings` 套件里标有 `#13` 的测试下,将每个 `assert` 改成 `assert.isString` 或 `assert.isNotString` 方法,通过测试(结果应该返回 `true`)。 不要修改传给断言的参数。
# --hints--
-All tests should pass.
+应通过所有测试。
```js
(getUserInput) =>
@@ -32,7 +32,7 @@ All tests should pass.
);
```
-You should choose the correct method for the first assertion - `isString` vs. `isNotString`.
+应该为第一个断言选择正确的方法:`isString` 或 `isNotString`。
```js
(getUserInput) =>
@@ -50,7 +50,7 @@ You should choose the correct method for the first assertion - `isString` vs. `i
);
```
-You should choose the correct method for the second assertion - `isString` vs. `isNotString`.
+应该为第二个断言选择正确的方法:`isString` 或 `isNotString`。
```js
(getUserInput) =>
@@ -68,7 +68,7 @@ You should choose the correct method for the second assertion - `isString` vs. `
);
```
-You should choose the correct method for the third assertion - `isString` vs. `isNotString`.
+应该为第三个断言选择正确的方法:`isString` 或 `isNotString`。
```js
(getUserInput) =>
diff --git a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-is-an-array.md b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-is-an-array.md
index aa9ba1e31a..b7a23d7cbb 100644
--- a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-is-an-array.md
+++ b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-is-an-array.md
@@ -1,6 +1,6 @@
---
id: 587d824d367417b2b2512c50
-title: Test if a Value is an Array
+title: 测试某个值是否为数组
challengeType: 2
forumTopicId: 301600
dashedName: test-if-a-value-is-an-array
@@ -8,15 +8,15 @@ dashedName: test-if-a-value-is-an-array
# --description--
-As a reminder, this project is being built upon the following starter project on [Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-mochachai), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-mochachai/).
+请注意,本项目在[这个 Repl.it 项目](https://repl.it/github/freeCodeCamp/boilerplate-mochachai)的基础上进行开发。你也可以从 [GitHub](https://repl.it/github/freeCodeCamp/boilerplate-mochachai) 上克隆。
# --instructions--
-Within `tests/1_unit-tests.js` under the test labelled `#11` in the `Arrays` suite, change each `assert` to either `assert.isArray` or `assert.isNotArray` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts.
+在 `tests/1_unit-tests.js` 中,`Arrays` 套件里标有 `#11` 的测试下,将每个 `assert` 改成 `assert.isArray` 或 `assert.isNotArray` 方法,通过测试(结果应该返回 `true`)。 不要改变传入断言的参数。
# --hints--
-All tests should pass.
+不应有未通过的测试
```js
(getUserInput) =>
@@ -30,7 +30,7 @@ All tests should pass.
);
```
-You should choose the correct method for the first assertion - `isArray` vs. `isNotArray`.
+请选择正确的断言——`isArray` 或 `isNotArray`。
```js
(getUserInput) =>
@@ -48,7 +48,7 @@ You should choose the correct method for the first assertion - `isArray` vs. `is
);
```
-You should choose the correct method for the second assertion - `isArray` vs. `isNotArray`.
+请选择正确的断言——`isArray` 或 `isNotArray`。
```js
(getUserInput) =>
diff --git a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-is-of-a-specific-data-structure-type.md b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-is-of-a-specific-data-structure-type.md
index d40e7da38a..da2ba2e9e6 100644
--- a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-is-of-a-specific-data-structure-type.md
+++ b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-value-is-of-a-specific-data-structure-type.md
@@ -1,6 +1,6 @@
---
id: 587d824e367417b2b2512c56
-title: Test if a Value is of a Specific Data Structure Type
+title: 测试值是否为特定数据结构类型
challengeType: 2
forumTopicId: 301601
dashedName: test-if-a-value-is-of-a-specific-data-structure-type
@@ -8,17 +8,17 @@ dashedName: test-if-a-value-is-of-a-specific-data-structure-type
# --description--
-As a reminder, this project is being built upon the following starter project on [Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-mochachai), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-mochachai/).
+请注意,本项目在[这个 Repl.it 项目](https://repl.it/github/freeCodeCamp/boilerplate-mochachai)的基础上进行开发。你也可以从 [GitHub](https://repl.it/github/freeCodeCamp/boilerplate-mochachai) 上克隆。
-`#typeOf` asserts that value's type is the given string, as determined by `Object.prototype.toString`.
+`#typeOf` 断言一个值的类型符合给定的类型,这个类型与 `Object.prototype.toString` 一致。
# --instructions--
-Within `tests/1_unit-tests.js` under the test labelled `#17` in the `Objects` suite, change each `assert` to either `assert.typeOf` or `assert.notTypeOf` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts.
+在 `tests/1_unit-tests.js` 中,`Objects` 套件里标有 `#17` 的测试下,将每个 `assert` 改成 `assert.typeOf` 或 `assert.notTypeOf` 方法,通过测试(结果应该返回 `true`)。 不要修改传给断言的参数。
# --hints--
-All tests should pass.
+应通过所有测试。
```js
(getUserInput) =>
@@ -32,7 +32,7 @@ All tests should pass.
);
```
-You should choose the correct method for the first assertion - `typeOf` vs. `notTypeOf`.
+应该为第一个断言选择正确的方法:`typeOf` 或 `notTypeOf`。
```js
(getUserInput) =>
@@ -50,7 +50,7 @@ You should choose the correct method for the first assertion - `typeOf` vs. `not
);
```
-You should choose the correct method for the second assertion - `typeOf` vs. `notTypeOf`.
+应该为第二个断言选择正确的方法:`typeOf` 或 `notTypeOf`。
```js
(getUserInput) =>
@@ -68,7 +68,7 @@ You should choose the correct method for the second assertion - `typeOf` vs. `no
);
```
-You should choose the correct method for the third assertion - `typeOf` vs. `notTypeOf`.
+应该为第三个断言选择正确的方法:`typeOf` 或 `notTypeOf`。
```js
(getUserInput) =>
@@ -86,7 +86,7 @@ You should choose the correct method for the third assertion - `typeOf` vs. `not
);
```
-You should choose the correct method for the fourth assertion - `typeOf` vs. `notTypeOf`.
+应该为第四个断言选择正确的方法:`typeOf` 或 `notTypeOf`。
```js
(getUserInput) =>
@@ -104,7 +104,7 @@ You should choose the correct method for the fourth assertion - `typeOf` vs. `no
);
```
-You should choose the correct method for the fifth assertion - `typeOf` vs. `notTypeOf`.
+应该为第五个断言选择正确的方法:`typeOf` 或 `notTypeOf`。
```js
(getUserInput) =>
diff --git a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-variable-or-function-is-defined.md b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-variable-or-function-is-defined.md
index e90101f335..930cdd04cd 100644
--- a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-variable-or-function-is-defined.md
+++ b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-a-variable-or-function-is-defined.md
@@ -1,6 +1,6 @@
---
id: 587d824b367417b2b2512c47
-title: Test if a Variable or Function is Defined
+title: 测试变量或函数是否已定义
challengeType: 2
forumTopicId: 301602
dashedName: test-if-a-variable-or-function-is-defined
@@ -8,15 +8,15 @@ dashedName: test-if-a-variable-or-function-is-defined
# --description--
-As a reminder, this project is being built upon the following starter project on [Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-mochachai), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-mochachai/).
+请注意,本项目在[这个 Repl.it 项目](https://repl.it/github/freeCodeCamp/boilerplate-mochachai)的基础上进行开发。你也可以从 [GitHub](https://repl.it/github/freeCodeCamp/boilerplate-mochachai) 上克隆。
# --instructions--
-Within `tests/1_unit-tests.js` under the test labelled `#2` in the `Basic Assertions` suite, change each `assert` to either `assert.isDefined()` or `assert.isUndefined()` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts.
+在 `tests/1_unit-tests.js` 中,`Basic Assertions` 套件中标注为 `#2` 的测试下,修改每个 `assert` 为 `assert.isDefined()` 或 `assert.isUndefined()`,通过测试(结果应为 `true`)。 不要修改传给断言的参数。
# --hints--
-All tests should pass.
+应通过所有测试。
```js
(getUserInput) =>
@@ -30,7 +30,7 @@ All tests should pass.
);
```
-You should choose the correct method for the first assertion - `isDefined` vs. `isUndefined`.
+应该为第一个断言选择正确的方法:`isDefined` 或 `isUndefined`。
```js
(getUserInput) =>
@@ -48,7 +48,7 @@ You should choose the correct method for the first assertion - `isDefined` vs. `
);
```
-You should choose the correct method for the second assertion - `isDefined` vs. `isUndefined`.
+应该为第二个断言选择正确的方法:`isDefined` 或 `isUndefined`。
```js
(getUserInput) =>
@@ -66,7 +66,7 @@ You should choose the correct method for the second assertion - `isDefined` vs.
);
```
-You should choose the correct method for the third assertion - `isDefined` vs. `isUndefined`.
+应该为第三个断言选择正确的方法:`isDefined` 或 `isUndefined`。
```js
(getUserInput) =>
diff --git a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-an-array-contains-an-item.md b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-an-array-contains-an-item.md
index 320f7b6edb..4070bec66b 100644
--- a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-an-array-contains-an-item.md
+++ b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-an-array-contains-an-item.md
@@ -1,6 +1,6 @@
---
id: 587d824d367417b2b2512c51
-title: Test if an Array Contains an Item
+title: 测试数组是否包含项目
challengeType: 2
forumTopicId: 301603
dashedName: test-if-an-array-contains-an-item
@@ -8,15 +8,15 @@ dashedName: test-if-an-array-contains-an-item
# --description--
-As a reminder, this project is being built upon the following starter project on [Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-mochachai), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-mochachai/).
+请注意,本项目在[这个 Repl.it 项目](https://repl.it/github/freeCodeCamp/boilerplate-mochachai)的基础上进行开发。你也可以从 [GitHub](https://repl.it/github/freeCodeCamp/boilerplate-mochachai) 上克隆。
# --instructions--
-Within `tests/1_unit-tests.js` under the test labelled `#12` in the `Arrays` suite, change each `assert` to either `assert.include` or `assert.notInclude` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts.
+在 `tests/1_unit-tests.js` 中,`Arrays` 套件里标有 `#12` 的测试下,将每个 `assert` 改成 `assert.include` 或 `assert.notInclude` 方法,通过测试(结果应该返回 `true`)。 不要修改传给断言的参数。
# --hints--
-All tests should pass.
+应通过所有测试。
```js
(getUserInput) =>
@@ -30,7 +30,7 @@ All tests should pass.
);
```
-You should choose the correct method for the first assertion - `include` vs. `notInclude`.
+应该为第一个断言选择正确的方法:`include` 或 `notInclude`。
```js
(getUserInput) =>
@@ -48,7 +48,7 @@ You should choose the correct method for the first assertion - `include` vs. `no
);
```
-You should choose the correct method for the second assertion - `include` vs. `notInclude`.
+应该为第二个断言选择正确的方法:`include` 或 `notInclude`。
```js
(getUserInput) =>
diff --git a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-an-object-has-a-property.md b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-an-object-has-a-property.md
index 34d88a9ff4..1605645c4e 100644
--- a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-an-object-has-a-property.md
+++ b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-an-object-has-a-property.md
@@ -1,6 +1,6 @@
---
id: 587d824e367417b2b2512c55
-title: Test if an Object has a Property
+title: 测试对象是否具有某个属性
challengeType: 2
forumTopicId: 301604
dashedName: test-if-an-object-has-a-property
@@ -8,17 +8,17 @@ dashedName: test-if-an-object-has-a-property
# --description--
-As a reminder, this project is being built upon the following starter project on [Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-mochachai), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-mochachai/).
+请注意,本项目在[这个 Repl.it 项目](https://repl.it/github/freeCodeCamp/boilerplate-mochachai)的基础上进行开发。你也可以从 [GitHub](https://repl.it/github/freeCodeCamp/boilerplate-mochachai) 上克隆。
-`property` asserts that the actual object has a given property.
+`property` 断言一个对象含有给定属性。
# --instructions--
-Within `tests/1_unit-tests.js` under the test labelled `#16` in the `Objects` suite, change each `assert` to either `assert.property` or `assert.notProperty` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts.
+在 `tests/1_unit-tests.js` 中,`Objects` 套件里标有 `#16` 的测试下,将每个 `assert` 改成 `assert.property` 或 `assert.notProperty` 方法,通过测试(结果应该返回 `true`)。 不要修改传给断言的参数。
# --hints--
-All tests should pass.
+应通过所有测试。
```js
(getUserInput) =>
@@ -32,7 +32,7 @@ All tests should pass.
);
```
-You should choose the correct method for the first assertion - `property` vs. `notProperty`.
+应该为第一个断言选择正确的方法:`property` 或 `notProperty`。
```js
(getUserInput) =>
@@ -50,7 +50,7 @@ You should choose the correct method for the first assertion - `property` vs. `n
);
```
-You should choose the correct method for the second assertion - `property` vs. `notProperty`.
+应该为第二个断言选择正确的方法:`property` 或 `notProperty`。
```js
(getUserInput) =>
@@ -68,7 +68,7 @@ You should choose the correct method for the second assertion - `property` vs. `
);
```
-You should choose the correct method for the third assertion - `property` vs. `notProperty`.
+应该为第三个断言选择正确的方法:`property` 或 `notProperty`。
```js
(getUserInput) =>
diff --git a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-an-object-is-an-instance-of-a-constructor.md b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-an-object-is-an-instance-of-a-constructor.md
index cccba2ce79..7c154273cc 100644
--- a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-an-object-is-an-instance-of-a-constructor.md
+++ b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-an-object-is-an-instance-of-a-constructor.md
@@ -1,6 +1,6 @@
---
id: 587d824e367417b2b2512c57
-title: Test if an Object is an Instance of a Constructor
+title: 测试对象是否是构造函数的实例
challengeType: 2
forumTopicId: 301605
dashedName: test-if-an-object-is-an-instance-of-a-constructor
@@ -8,17 +8,17 @@ dashedName: test-if-an-object-is-an-instance-of-a-constructor
# --description--
-As a reminder, this project is being built upon the following starter project on [Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-mochachai), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-mochachai/).
+请注意,本项目在[这个 Repl.it 项目](https://repl.it/github/freeCodeCamp/boilerplate-mochachai)的基础上进行开发。你也可以从 [GitHub](https://repl.it/github/freeCodeCamp/boilerplate-mochachai) 上克隆。
-`#instanceOf` asserts that an object is an instance of a constructor.
+`#instanceOf` 断言一个对象是一个构造器的实例。
# --instructions--
-Within `tests/1_unit-tests.js` under the test labelled `#18` in the `Objects` suite, change each `assert` to either `assert.instanceOf` or `assert.notInstanceOf` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts.
+在 `tests/1_unit-tests.js` 中,`Objects` 套件里标有 `#18` 的测试下,将每个 `assert` 改成 `assert.instanceOf` 或 `assert.notInstanceOf` 方法,通过测试(结果应该返回 `true`)。 不要修改传给断言的参数。
# --hints--
-All tests should pass.
+应通过所有测试。
```js
(getUserInput) =>
@@ -32,7 +32,7 @@ All tests should pass.
);
```
-You should choose the correct method for the first assertion - `instanceOf` vs. `notInstanceOf`.
+应该为第一个断言选择正确的方法:`instanceOf` 或 `notInstanceOf`。
```js
(getUserInput) =>
@@ -50,7 +50,7 @@ You should choose the correct method for the first assertion - `instanceOf` vs.
);
```
-You should choose the correct method for the second assertion - `instanceOf` vs. `notInstanceOf`.
+应该为第二个断言选择正确的方法:`instanceOf` 或 `notInstanceOf`。
```js
(getUserInput) =>
@@ -68,7 +68,7 @@ You should choose the correct method for the second assertion - `instanceOf` vs.
);
```
-You should choose the correct method for the third assertion - `instanceOf` vs. `notInstanceOf`.
+应该为第三个断言选择正确的方法:`instanceOf` 或 `notInstanceOf`。
```js
(getUserInput) =>
@@ -86,7 +86,7 @@ You should choose the correct method for the third assertion - `instanceOf` vs.
);
```
-You should choose the correct method for the fourth assertion - `instanceOf` vs. `notInstanceOf`.
+应该为第四个断言选择正确的方法:`instanceOf` 或 `notInstanceOf`。
```js
(getUserInput) =>
diff --git a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-one-value-is-below-or-at-least-as-large-as-another.md b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-one-value-is-below-or-at-least-as-large-as-another.md
index be4dcadd85..c18f2f0ede 100644
--- a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-one-value-is-below-or-at-least-as-large-as-another.md
+++ b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/test-if-one-value-is-below-or-at-least-as-large-as-another.md
@@ -1,6 +1,6 @@
---
id: 587d824c367417b2b2512c4e
-title: Test if One Value is Below or At Least as Large as Another
+title: 测试一个值是否小于或等于另一个值
challengeType: 2
forumTopicId: 301606
dashedName: test-if-one-value-is-below-or-at-least-as-large-as-another
@@ -8,15 +8,15 @@ dashedName: test-if-one-value-is-below-or-at-least-as-large-as-another
# --description--
-As a reminder, this project is being built upon the following starter project on [Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-mochachai), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-mochachai/).
+请注意,本项目在[这个 Repl.it 项目](https://repl.it/github/freeCodeCamp/boilerplate-mochachai)的基础上进行开发。你也可以从 [GitHub](https://repl.it/github/freeCodeCamp/boilerplate-mochachai) 上克隆。
# --instructions--
-Within `tests/1_unit-tests.js` under the test labelled `#9` in the `Comparisons` suite, change each `assert` to either `assert.isBelow` or `assert.isAtLeast` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts.
+在 `tests/1_unit-tests.js` 中,在 `Comparisons` 套件里标有 `#9` 的测试中,将每个 `assert` 改成 `assert.isBelow` 或 `assert.isAtLeast` 方法,让测试通过(结果应该返回 `true`)。 不要修改传给断言的参数。
# --hints--
-All tests should pass.
+应通过所有测试。
```js
(getUserInput) =>
@@ -30,7 +30,7 @@ All tests should pass.
);
```
-You should choose the correct method for the first assertion - `isBelow` vs. `isAtLeast`.
+应该为第一个断言选择正确的方法:`isBelow` 或 `isAtLeast`。
```js
(getUserInput) =>
@@ -48,7 +48,7 @@ You should choose the correct method for the first assertion - `isBelow` vs. `is
);
```
-You should choose the correct method for the second assertion - `isBelow` vs. `isAtLeast`.
+应该为第二个断言选择正确的方法:`isBelow` 或 `isAtLeast`。
```js
(getUserInput) =>
@@ -66,7 +66,7 @@ You should choose the correct method for the second assertion - `isBelow` vs. `i
);
```
-You should choose the correct method for the third assertion - `isBelow` vs. `isAtLeast`.
+应该为第三个断言选择正确的方法:`isBelow` 或 `isAtLeast`。
```js
(getUserInput) =>
@@ -80,7 +80,7 @@ You should choose the correct method for the third assertion - `isBelow` vs. `is
);
```
-You should choose the correct method for the fourth assertion - `isBelow` vs. `isAtLeast`.
+应该为第四个断言选择正确的方法:`isBelow` 或 `isAtLeast`。
```js
(getUserInput) =>
diff --git a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/use-assert.isok-and-assert.isnotok.md b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/use-assert.isok-and-assert.isnotok.md
index d7cd803053..4ee8c87b38 100644
--- a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/use-assert.isok-and-assert.isnotok.md
+++ b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/use-assert.isok-and-assert.isnotok.md
@@ -1,6 +1,6 @@
---
id: 587d824b367417b2b2512c48
-title: Use Assert.isOK and Assert.isNotOK
+title: 使用 Assert.isOk() 和 Assert.isNotOK()
challengeType: 2
forumTopicId: 301607
dashedName: use-assert-isok-and-assert-isnotok
@@ -8,19 +8,19 @@ dashedName: use-assert-isok-and-assert-isnotok
# --description--
-As a reminder, this project is being built upon the following starter project on [Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-mochachai), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-mochachai/).
+请注意,本项目在[这个 Repl.it 项目](https://repl.it/github/freeCodeCamp/boilerplate-mochachai)的基础上进行开发。你也可以从 [GitHub](https://repl.it/github/freeCodeCamp/boilerplate-mochachai) 上克隆。
-`isOk()` will test for a truthy value, and `isNotOk()` will test for a falsy value.
+`isOk()` 用来测试值是否为真值,`isNotOk()` 用来测试值是否为假值。
-To learn more about truthy and falsy values, try our [Falsy Bouncer](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-algorithm-scripting/falsy-bouncer) challenge.
+可以在[过滤数组中的假值](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-algorithm-scripting/falsy-bouncer)这个挑战中了解更多关于真值和假值的信息。
# --instructions--
-Within `tests/1_unit-tests.js` under the test labelled `#3` in the `Basic Assertions` suite, change each `assert` to either `assert.isOk()` or `assert.isNotOk()` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts.
+在 `tests/1_unit-tests.js` 中,`Basic Assertions` 套件中标注为 `#3` 的测试下,修改每个 `assert` 为 `assert.isOk()` 或 `assert.isNotOk()`,通过测试(结果应为 `true`)。 不要修改传入断言的参数。
# --hints--
-All tests should pass.
+应通过所有测试。
```js
(getUserInput) =>
@@ -34,7 +34,7 @@ All tests should pass.
);
```
-You should choose the correct method for the first assertion - `isOk` vs. `isNotOk`.
+应该第一个断言选择正确的方法:`isOk` 或 `isNotOk`。
```js
(getUserInput) =>
@@ -48,7 +48,7 @@ You should choose the correct method for the first assertion - `isOk` vs. `isNot
);
```
-You should choose the correct method for the second assertion - `isOk` vs. `isNotOk`.
+应该第二个断言选择正确的方法:`isOk` 或 `isNotOk`。
```js
(getUserInput) =>
@@ -62,7 +62,7 @@ You should choose the correct method for the second assertion - `isOk` vs. `isNo
);
```
-You should choose the correct method for the third assertion - `isOk` vs. `isNotOk`.
+应该第三个断言选择正确的方法:`isOk` 或 `isNotOk`。
```js
(getUserInput) =>
diff --git a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/use-regular-expressions-to-test-a-string.md b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/use-regular-expressions-to-test-a-string.md
index bfd745c7ee..836a45e3e0 100644
--- a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/use-regular-expressions-to-test-a-string.md
+++ b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/use-regular-expressions-to-test-a-string.md
@@ -1,6 +1,6 @@
---
id: 587d824d367417b2b2512c54
-title: Use Regular Expressions to Test a String
+title: 使用正则表达式测试字符串
challengeType: 2
forumTopicId: 301608
dashedName: use-regular-expressions-to-test-a-string
@@ -8,17 +8,17 @@ dashedName: use-regular-expressions-to-test-a-string
# --description--
-As a reminder, this project is being built upon the following starter project on [Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-mochachai), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-mochachai/).
+请注意,本项目在[这个 Repl.it 项目](https://repl.it/github/freeCodeCamp/boilerplate-mochachai)的基础上进行开发。你也可以从 [GitHub](https://repl.it/github/freeCodeCamp/boilerplate-mochachai) 上克隆。
-`match()` asserts that the actual value matches the second argument regular expression.
+`match()` 断言一个值匹配一个正则表达式(第二个参数)。
# --instructions--
-Within `tests/1_unit-tests.js` under the test labelled `#15` in the `Strings` suite, change each `assert` to either `assert.match` or `assert.notMatch` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts.
+在 `tests/1_unit-tests.js` 中,`Strings` 套件里标有 `#15` 的测试下,将每个 `assert` 改成 `assert.match` 或 `assert.notMatch` 方法,通过测试(结果应该返回 `true`)。 不要修改传给断言的参数。
# --hints--
-All tests should pass.
+应通过所有测试。
```js
(getUserInput) =>
@@ -32,7 +32,7 @@ All tests should pass.
);
```
-You should choose the correct method for the first assertion - `match` vs. `notMatch`.
+应该为第一个断言选择正确的方法:`match` 或 `notMatch`。
```js
(getUserInput) =>
@@ -50,7 +50,7 @@ You should choose the correct method for the first assertion - `match` vs. `notM
);
```
-You should choose the correct method for the second assertion - `match` vs. `notMatch`.
+应该为第二个断言选择正确的方法:`match` 或 `notMatch`。
```js
(getUserInput) =>
diff --git a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/use-the-double-equals-to-assert-equality.md b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/use-the-double-equals-to-assert-equality.md
index eab031cce7..63d6b020a8 100644
--- a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/use-the-double-equals-to-assert-equality.md
+++ b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/use-the-double-equals-to-assert-equality.md
@@ -1,6 +1,6 @@
---
id: 587d824b367417b2b2512c4a
-title: Use the Double Equals to Assert Equality
+title: 用两个等号断言相等
challengeType: 2
forumTopicId: 301609
dashedName: use-the-double-equals-to-assert-equality
@@ -8,17 +8,17 @@ dashedName: use-the-double-equals-to-assert-equality
# --description--
-As a reminder, this project is being built upon the following starter project on [Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-mochachai), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-mochachai/).
+请注意,本项目在[这个 Repl.it 项目](https://repl.it/github/freeCodeCamp/boilerplate-mochachai)的基础上进行开发。你也可以从 [GitHub](https://repl.it/github/freeCodeCamp/boilerplate-mochachai) 上克隆。
-`equal()` compares objects using `==`.
+`equal()` 使用 `==` 比较对象。
# --instructions--
-Within `tests/1_unit-tests.js` under the test labelled `#5` in the `Equality` suite, change each `assert` to either `assert.equal` or `assert.notEqual` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts.
+在 `tests/1_unit-tests.js` 中,在 `Equality` 套件里标有 `#5` 的测试里,将每个 `assert` 改为 `assert.equal` 或 `assert.notEqual`,通过测试(应该返回 `true`)。 不要修改传给断言的参数。
# --hints--
-All tests should pass.
+应通过所有测试。
```js
(getUserInput) =>
@@ -32,7 +32,7 @@ All tests should pass.
);
```
-You should choose the correct method for the first assertion - `equal` vs. `notEqual`.
+应该为第一个断言选择正确的方法:`equal` 或 `notEqual`。
```js
(getUserInput) =>
@@ -50,7 +50,7 @@ You should choose the correct method for the first assertion - `equal` vs. `notE
);
```
-You should choose the correct method for the second assertion - `equal` vs. `notEqual`.
+应该为第二个断言选择正确的方法:`equal` 或 `notEqual`。
```js
(getUserInput) =>
@@ -68,7 +68,7 @@ You should choose the correct method for the second assertion - `equal` vs. `not
);
```
-You should choose the correct method for the third assertion - `equal` vs. `notEqual`.
+应该为第三个断言选择正确的方法:`equal` 或 `notEqual`。
```js
(getUserInput) =>
@@ -86,7 +86,7 @@ You should choose the correct method for the third assertion - `equal` vs. `notE
);
```
-You should choose the correct method for the fourth assertion - `equal` vs. `notEqual`.
+应该为第四个断言选择正确的方法:`equal` 或 `notEqual`。
```js
(getUserInput) =>
diff --git a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/use-the-triple-equals-to-assert-strict-equality.md b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/use-the-triple-equals-to-assert-strict-equality.md
index de0259762c..d07690800b 100644
--- a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/use-the-triple-equals-to-assert-strict-equality.md
+++ b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/use-the-triple-equals-to-assert-strict-equality.md
@@ -1,6 +1,6 @@
---
id: 587d824b367417b2b2512c4b
-title: Use the Triple Equals to Assert Strict Equality
+title: 用三个等号断言严格相等
challengeType: 2
forumTopicId: 301610
dashedName: use-the-triple-equals-to-assert-strict-equality
@@ -8,17 +8,17 @@ dashedName: use-the-triple-equals-to-assert-strict-equality
# --description--
-As a reminder, this project is being built upon the following starter project on [Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-mochachai), or cloned from [GitHub](https://github.com/freeCodeCamp/boilerplate-mochachai/).
+请注意,本项目在[这个 Repl.it 项目](https://repl.it/github/freeCodeCamp/boilerplate-mochachai)的基础上进行开发。你也可以从 [GitHub](https://repl.it/github/freeCodeCamp/boilerplate-mochachai) 上克隆。
-`strictEqual()` compares objects using `===`.
+`strictEqual()` 使用 `===` 比较对象。
# --instructions--
-Within `tests/1_unit-tests.js` under the test labelled `#6` in the `Equality` suite, change each `assert` to either `assert.strictEqual` or `assert.notStrictEqual` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts.
+在 `tests/1_unit-tests.js` 中,在 `Equality` 套件里标有 `#6` 的测试下,将每个 `assert` 改为 `assert.strictEqual` 或 `assert.notStrictEqual`,让测试通过(应该返回 `true`)。 不要修改传给断言的参数。
# --hints--
-All tests should pass.
+应通过所有测试。
```js
(getUserInput) =>
@@ -32,7 +32,7 @@ All tests should pass.
);
```
-You should choose the correct method for the first assertion - `strictEqual` vs. `notStrictEqual`.
+应该为第一个断言选择正确的方法:`strictEqual` 或 `notStrictEqual`。
```js
(getUserInput) =>
@@ -50,7 +50,7 @@ You should choose the correct method for the first assertion - `strictEqual` vs.
);
```
-You should choose the correct method for the second assertion - `strictEqual` vs. `notStrictEqual`.
+应该为第二个断言选择正确的方法:`strictEqual` 或 `notStrictEqual`。
```js
(getUserInput) =>
@@ -64,7 +64,7 @@ You should choose the correct method for the second assertion - `strictEqual` vs
);
```
-You should choose the correct method for the third assertion - `strictEqual` vs. `notStrictEqual`.
+应该为第三个断言选择正确的方法:`strictEqual` 或 `notStrictEqual`。
```js
(getUserInput) =>
@@ -82,7 +82,7 @@ You should choose the correct method for the third assertion - `strictEqual` vs.
);
```
-You should choose the correct method for the fourth assertion - `strictEqual` vs. `notStrictEqual`.
+应该为第四个断言选择正确的方法:`strictEqual` 或 `notStrictEqual`。
```js
(getUserInput) =>
diff --git a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/american-british-translator.md b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/american-british-translator.md
index c2e5448f12..530d95d709 100644
--- a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/american-british-translator.md
+++ b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/american-british-translator.md
@@ -1,68 +1,68 @@
---
id: 5e601c0d5ac9d0ecd8b94afe
-title: American British Translator
+title: 美式英语英式英语转换器
challengeType: 4
dashedName: american-british-translator
---
# --description--
-Build a full stack JavaScript app that is functionally similar to this: . Working on this project will involve you writing your code using one of the following methods:
+构建一个 JavaScript 的全栈应用,在功能上与这个应用相似:。 可以采用下面的任意一种方式完成这个挑战:
-- Clone [this GitHub repo](https://github.com/freeCodeCamp/boilerplate-project-american-british-english-translator/) and complete your project locally.
-- Use [our repl.it starter project](https://repl.it/github/freeCodeCamp/boilerplate-project-american-british-english-translator) to complete your project.
-- Use a site builder of your choice to complete the project. Be sure to incorporate all the files from our GitHub repo.
+- 克隆 [这个 GitHub 仓库](https://github.com/freeCodeCamp/boilerplate-project-american-british-english-translator/) 并在本地完成项目。
+- 使用 [repl.it 上的初始化项目](https://repl.it/github/freeCodeCamp/boilerplate-project-american-british-english-translator) 来完成项目。
+- 使用您选择的站点生成器来完成项目。 并确保包含了我们 GitHub 仓库的所有文件。
-When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field.
+当完成本项目,请确认有一个可以公开访问的正常运行 demo 。 然后将 URL 提交到 `Solution Link` 中。 此外,还可以将项目的源码提交到 `GitHub Link` 中。
# --instructions--
-- All logic can go into `/components/translator.js`
-- Complete the `/api/translate` route in `/routes/api.js`
-- Create all of the unit/functional tests in `tests/1_unit-tests.js` and `tests/2_functional-tests.js`
-- See the JavaScript files in `/components` for the different spelling and terms your application should translate
-- To run the tests on Repl.it, set `NODE_ENV` to `test` without quotes in the `.env` file
-- To run the tests in the console, use the command `npm run test`. To open the Repl.it console, press Ctrl+Shift+P (Cmd if on a Mac) and type "open shell"
+- 所有逻辑都可以进入 `/components/translator.js`
+- 在 `/routes/api.js` 中完成 `/api/translate` 路由
+- 在 `tests/1_unit-tests.js` 和 `tests/2_functional-tests.js` 中创建所有 unit/functional 测试
+- 查看 `/components` 中的 JavaScript 文件以获取应用程序应该翻译的条款以及不同的拼写
+- 在 `.env` 文件中将 `NODE_ENV` 设置为 `test`(没有引号),运行 Repl.it 上的测试。
+- 使用 `npm run test` 命令,在 console 运行测试。 按 Ctrl+Shift+P (在 Mac 上是 Cmd+Shift+P) 并输入"open shell",打开 Repl.it 控制台。
-Write the following tests in `tests/1_unit-tests.js`:
+在 `tests/1_unit-tests.js` 中写下以下测试:
-- Translate `Mangoes are my favorite fruit.` to British English
-- Translate `I ate yogurt for breakfast.` to British English
-- Translate `We had a party at my friend's condo.` to British English
-- Translate `Can you toss this in the trashcan for me?` to British English
-- Translate `The parking lot was full.` to British English
-- Translate `Like a high tech Rube Goldberg machine.` to British English
-- Translate `To play hooky means to skip class or work.` to British English
-- Translate `No Mr. Bond, I expect you to die.` to British English
-- Translate `Dr. Grosh will see you now.` to British English
-- Translate `Lunch is at 12:15 today.` to British English
-- Translate `We watched the footie match for a while.` to American English
-- Translate `Paracetamol takes up to an hour to work.` to American English
-- Translate `First, caramelise the onions.` to American English
-- Translate `I spent the bank holiday at the funfair.` to American English
-- Translate `I had a bicky then went to the chippy.` to American English
-- Translate `I've just got bits and bobs in my bum bag.` to American English
-- Translate `The car boot sale at Boxted Airfield was called off.` to American English
-- Translate `Have you met Mrs Kalyani?` to American English
-- Translate `Prof Joyner of King's College, London.` to American English
-- Translate `Tea time is usually around 4 or 4.30.` to American English
-- Highlight translation in `Mangoes are my favorite fruit.`
-- Highlight translation in `I ate yogurt for breakfast.`
-- Highlight translation in `We watched the footie match for a while.`
-- Highlight translation in `Paracetamol takes up to an hour to work.`
+- 将 `Mangoes are my favorite fruit.` 转换成英式英语。
+- 将 `I ate yogurt for breakfast.` 转换成英式英语。
+- 将 `We had a party at my friend's condo.` 转换成英式英语。
+- 将 `Can you toss this in the trashcan for me?` 转换成英式英语。
+- 将 `The parking lot was full.` 转换成英式英语。
+- 将 `Like a high tech Rube Goldberg machine.` 转换成英式英语。
+- 将 `To play hooky means to skip class or work.` 转换成英式英语。
+- 将 `No Mr. Bond, I expect you to die.` 转换成英式英语。
+- 将 `Dr. Grosh will see you now.` 转换成英式英语。
+- 将 `Lunch is at 12:15 today.` 转换成英式英语。
+- 将 `We watched the footie match for a while.` 转换成美式英语。
+- 将 `Paracetamol takes up to an hour to work.` 转换成美式英语。
+- 将 `First, caramelise the onions.` 转换成美式英语。
+- 将 `I spent the bank holiday at the funfair.` 转换成美式英语。
+- 将 `I had a bicky then went to the chippy.` 转换成美式英语。
+- 将 `I've just got bits and bobs in my bum bag.` 转换成美式英语。
+- 将 `The car boot sale at Boxted Airfield was called off.` 转换成美式英语。
+- 将 `Have you met Mrs Kalyani?` 转换成美式英语。
+- 将 `Prof Joyner of King's College, London.` 转换成美式英语。
+- 将 `Tea time is usually around 4 or 4.30.` 转换成美式英语。
+- 将 `Mangoes are my favorite fruit.` 里的转换高亮。
+- 高亮 `I ate yogurt for breakfast.` 里的转换。
+- 高亮 `We watched the footie match for a while.` 里的转换。
+- 高亮 `Paracetamol takes up to an hour to work.` 里的转换。
-Write the following tests in `tests/2_functional-tests.js`:
+在 `tests/2_functional-tests.js` 中写下以下测试:
-- Translation with text and locale fields: POST request to `/api/translate`
-- Translation with text and invalid locale field: POST request to `/api/translate`
-- Translation with missing text field: POST request to `/api/translate`
-- Translation with missing locale field: POST request to `/api/translate`
-- Translation with empty text: POST request to `/api/translate`
-- Translation with text that needs no translation: POST request to `/api/translate`
+- 翻译文本字段和本地化字段: POST 请求到 `/api/translate`
+- 翻译文本字段和无效的本地化字段: POST 请求到 `/api/translate`
+- 翻译缺失的文本字段: POST 请求到 `/api/translate`
+- 翻译缺失的本地化字段: POST 请求到 `/api/translate`
+- 翻译空的文本: POST 请求到 `/api/translate`
+- 翻译无需翻译的文本: POST 请求到 `/api/translate`
# --hints--
-I can provide my own project, not the example URL.
+我可以提供我自己的项目,而不是示例 URL。
```js
(getUserInput) => {
@@ -74,7 +74,7 @@ I can provide my own project, not the example URL.
};
```
-You can `POST` to `/api/translate` with a body containing `text` with the text to translate and `locale` with either `american-to-british` or `british-to-american`. The returned object should contain the submitted `text` and `translation` with the translated text.
+可以向 `/api/translate` 发送 `POST` 请求,对请求体内的 `text` 文本进行翻译, `locale` 字段可以是 `american-to-british` 或 `british-to-american`。 返回的对象应该包含提交的 `text` 以及翻译的文本 `translation`。
```js
async (getUserInput) => {
@@ -102,7 +102,7 @@ async (getUserInput) => {
};
```
-The `/api/translate` route should handle the way time is written in American and British English. For example, ten thirty is written as "10.30" in British English and "10:30" in American English. The `span` element should wrap the entire time string, i.e. `10:30`.
+`/api/translate` 路由应该可以处理用英美方式英语写的时间。 例如,十点半英式英语写为“10.30”,而美式英语写为“10:30”。 `span` 元素应该包裹整个时间字符串,即 `10:30`。
```js
async (getUserInput) => {
@@ -129,7 +129,7 @@ async (getUserInput) => {
};
```
-The `/api/translate` route should also handle the way titles/honorifics are abbreviated in American and British English. For example, Doctor Wright is abbreviated as "Dr Wright" in British English and "Dr. Wright" in American English. See `/public/american-to-british-titles.js` for the different titles your application should handle.
+`/api/translate` 路由也应该处理美式英语和英式英语中头衔/尊称的缩写方式。 例如,Doctor Wright 在英式英语中缩写为 “Dr Wright”,在美式英语中缩写为 “Dr. Wright"”。 查看 `/public/american-to-british-titles.js` 了应用程序应该处理的不同的头衔。
```js
async (getUserInput) => {
@@ -156,7 +156,7 @@ async (getUserInput) => {
};
```
-Wrap any translated spelling or terms with `...` tags so they appear in green.
+将任何翻译过的拼写或条目放在 `...` 标签内以使其显示为绿色。
```js
async (getUserInput) => {
@@ -184,7 +184,7 @@ async (getUserInput) => {
};
```
-If one or more of the required fields is missing, return `{ error: 'Required field(s) missing' }`.
+如果缺少一个或多个必填字段,返回 `{ error: 'Required field(s) missing' }`。
```js
async (getUserInput) => {
@@ -205,7 +205,7 @@ async (getUserInput) => {
};
```
-If `text` is empty, return `{ error: 'No text to translate' }`
+如果 `text` 为空,返回 `{ error: 'No text to translate' }`
```js
async (getUserInput) => {
@@ -226,7 +226,7 @@ async (getUserInput) => {
};
```
-If `locale` does not match one of the two specified locales, return `{ error: 'Invalid value for locale field' }`.
+如果 `locale` 与两个指定的 locales 都不匹配,返回 `{ error: 'Invalid value for locale field' }`。
```js
async (getUserInput) => {
@@ -248,7 +248,7 @@ async (getUserInput) => {
};
```
-If `text` requires no translation, return `"Everything looks good to me!"` for the `translation` value.
+如果 `text` 不需要翻译,返回的 `translation` 值为`"Everything looks good to me!"`。
```js
async (getUserInput) => {
@@ -275,7 +275,7 @@ async (getUserInput) => {
};
```
-All 24 unit tests are complete and passing. See `/tests/1_unit-tests.js` for the expected behavior you should write tests for.
+所有 24 个单元的测试都已完成并通过。 请参阅 `/tests/1_unit-tests.js` 来了解你应该写的测试的预期行为。
```js
async (getUserInput) => {
@@ -300,7 +300,7 @@ async (getUserInput) => {
};
```
-All 6 functional tests are complete and passing. See `/tests/2_functional-tests.js` for the functionality you should write tests for.
+所有 6 项功能测试都已完成并通过。 请参阅 `/tests/2_functional-tests.js` 来了解你应该写的测试的功能。
```js
async (getUserInput) => {
diff --git a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/issue-tracker.md b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/issue-tracker.md
index 46e3eb91af..57e6bde82c 100644
--- a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/issue-tracker.md
+++ b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/issue-tracker.md
@@ -1,6 +1,6 @@
---
id: 587d8249367417b2b2512c42
-title: Issue Tracker
+title: 问题跟踪器
challengeType: 4
forumTopicId: 301569
dashedName: issue-tracker
@@ -8,42 +8,42 @@ dashedName: issue-tracker
# --description--
-Build a full stack JavaScript app that is functionally similar to this: . Working on this project will involve you writing your code using one of the following methods:
+构建一个 JavaScript 的全栈应用,在功能上与这个应用相似: 。 可以采用下面的任意一种方式完成这个挑战:
-- Clone [this GitHub repo](https://github.com/freeCodeCamp/boilerplate-project-issuetracker/) and complete your project locally.
-- Use [this repl.it starter project](https://repl.it/github/freeCodeCamp/boilerplate-project-issuetracker) to complete your project.
-- Use a site builder of your choice to complete the project. Be sure to incorporate all the files from our GitHub repo.
+- 克隆 [GitHub 仓库](https://github.com/freeCodeCamp/boilerplate-project-issuetracker/) 并在本地完成你的项目。
+- 使用 [repl.it 上的初始化项目](https://repl.it/github/freeCodeCamp/boilerplate-project-issuetracker) 来完成项目。
+- 使用一个你喜欢的站点生成器来完成项目。 需要确定包含了我们 GitHub 仓库的所有文件。
-When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field.
+完成本项目后,请将一个正常运行的 demo(项目演示)托管在可以公开访问的平台。 然后在 `Solution Link` 框中提交你的项目 URL。 此外,还可以将项目的源码提交到 `GitHub Link` 中。
# --instructions--
-- Complete the necessary routes in `/routes/api.js`
-- Create all of the functional tests in `tests/2_functional-tests.js`
-- Copy the `sample.env` file to `.env` and set the variables appropriately
-- To run the tests uncomment `NODE_ENV=test` in your `.env` file
-- To run the tests in the console, use the command `npm run test`. To open the Repl.it console, press Ctrl+Shift+P (Cmd if on a Mac) and type "open shell"
+- 在 `/routes/api.js` 中完成必要的路由
+- 在 `tests/2_functional-tests.js` 中创建所有的功能测试
+- 复制 `sample.env` 文件到 `.env` 并按需设置变量
+- 要运行测试,在 `.env` 文件中取消注释 `NODE_ENV=test`
+- 使用 `npm run test` 命令,在 console 运行测试。 按 Ctrl+Shift+P (在 Mac 上是 Cmd+Shift+P) 并输入"open shell",打开 Repl.it 控制台。
-Write the following tests in `tests/2_functional-tests.js`:
+在 `tests/2_functional-tests.js` 中编写下以下测试:
-- Create an issue with every field: POST request to `/api/issues/{project}`
-- Create an issue with only required fields: POST request to `/api/issues/{project}`
-- Create an issue with missing required fields: POST request to `/api/issues/{project}`
-- View issues on a project: GET request to `/api/issues/{project}`
-- View issues on a project with one filter: GET request to `/api/issues/{project}`
-- View issues on a project with multiple filters: GET request to `/api/issues/{project}`
-- Update one field on an issue: PUT request to `/api/issues/{project}`
-- Update multiple fields on an issue: PUT request to `/api/issues/{project}`
-- Update an issue with missing `_id`: PUT request to `/api/issues/{project}`
-- Update an issue with no fields to update: PUT request to `/api/issues/{project}`
-- Update an issue with an invalid `_id`: PUT request to `/api/issues/{project}`
-- Delete an issue: DELETE request to `/api/issues/{project}`
-- Delete an issue with an invalid `_id`: DELETE request to `/api/issues/{project}`
-- Delete an issue with missing `_id`: DELETE request to `/api/issues/{project}`
+- 用所有字段创建 issue:POST 请求到 `/api/issues/{project}`
+- 用必填字段创建 issue:POST 请求到 `/api/issues/{project}`
+- 用缺失必填字段创建 issue:POST 请求到 `/api/issues/{project}`
+- 查看 project 里的 issue:GET 请求到 `/api/issues/{project}`
+- 用 filter 过滤 project 里的 issue:GET 请求到 `/api/issues/{project}`
+- 用多个 filter 过滤 project 里的 issue:GET 请求到 `/api/issues/{project}`
+- 更新 issue 里的一个字段:PUT 请求到 `/api/issues/{project}`
+- 更新 issue 里的多个字段:PUT 请求到 `/api/issues/{project}`
+- 在缺少 `_id` 字段的情况下更新 issue: PUT 请求到 `/api/issues/{project}`
+- 在没有字段更新的情况下调用更新:PUT 请求到 `/api/issues/{project}`
+- 传入一个无效的的 `_id` 来调用更新:PUT 请求到 `/api/issues/{project}`
+- 删除一个 issue:DELETE 请求到 `/api/issues/{project}`
+- 传入一个无效的的 `_id` 来调用删除:DELETE 请求到 `/api/issues/{project}`
+- 在缺失 `_id` 的情况下来调用删除:DELETE 请求到 `/api/issues/{project}`
# --hints--
-You can provide your own project, not the example URL.
+提交自己的项目,而不是示例的 URL。
```js
(getUserInput) => {
@@ -51,7 +51,7 @@ You can provide your own project, not the example URL.
};
```
-You can send a `POST` request to `/api/issues/{projectname}` with form data containing the required fields `issue_title`, `issue_text`, `created_by`, and optionally `assigned_to` and `status_text`.
+可以发送 `POST` 请求到 `/api/issues/{projectname}`,表单数据包含必填字段 `issue_title`、`issue_text`、`created_by` 和可选字段 `assigned_to` 以及 `status_text`。
```js
async (getUserInput) => {
@@ -73,7 +73,7 @@ async (getUserInput) => {
};
```
-The `POST` request to `/api/issues/{projectname}` will return the created object, and must include all of the submitted fields. Excluded optional fields will be returned as empty strings. Additionally, include `created_on` (date/time), `updated_on` (date/time), `open` (boolean, `true` for open - default value, `false` for closed), and `_id`.
+`POST` 请求到 `/api/issues/{projectname}` 将返回创建的对象,必须包含所有提交的全部字段。 如果没有填选填字段将作为空字符串返回. 此外,包含 `created_on` (日期/时间)、 `updated_on` (日期/时间)、 `open` (布尔型) `true` 用于打开 - 默认值, `false` 用于关闭, `_id`。
```js
async (getUserInput) => {
@@ -107,7 +107,7 @@ async (getUserInput) => {
};
```
-If you send a `POST` request to `/api/issues/{projectname}` without the required fields, returned will be the error `{ error: 'required field(s) missing' }`
+如果发送一个 `POST` 请求到 `/api/issues/{projectname}` 且缺少必填字段,会返回错误 `{ error: 'required field(s) missing' }`。
```js
async (getUserInput) => {
@@ -125,7 +125,7 @@ async (getUserInput) => {
};
```
-You can send a `GET` request to `/api/issues/{projectname}` for an array of all issues for that specific `projectname`, with all the fields present for each issue.
+可以发送 `GET` 请求到 `/api/issues/{projectname}` 请求所有指定 `projectname` 的 issues 数组,会展示每个 issue 的所有字段。
```js
async (getUserInput) => {
@@ -172,7 +172,7 @@ async (getUserInput) => {
};
```
-You can send a `GET` request to `/api/issues/{projectname}` and filter the request by also passing along any field and value as a URL query (ie. `/api/issues/{project}?open=false`). You can pass one or more field/value pairs at once.
+可以发送 `GET` 请求到 `/api/issues/{projectname}` 通过 URL 查询传入字段名和值过滤请求(如, `/api/issues/{project}?open=false`)。 你可以一次通过一个或多个字段/值对。
```js
async (getUserInput) => {
@@ -213,7 +213,7 @@ async (getUserInput) => {
};
```
-You can send a `PUT` request to `/api/issues/{projectname}` with an `_id` and one or more fields to update. On success, the `updated_on` field should be updated, and returned should be `{ result: 'successfully updated', '_id': _id }`.
+你可以发送一个 `PUT` 请求到 `/api/issues/{projectname}` 带有一个 `_id` 以及一个或多个字段进行更新。 成功后, `updated_on` field 应该被更新,返回的应该是 `{ result: 'successfully updated', '_id': _id }`。
```js
async (getUserInput) => {
@@ -248,7 +248,7 @@ async (getUserInput) => {
};
```
-When the `PUT` request sent to `/api/issues/{projectname}` does not include an `_id`, the return value is `{ error: 'missing _id' }`.
+当 `PUT` 请求发送给 `/api/issues/{projectname}` 的请求体不包含 `_id` 时应返回`{ error: 'missing _id' }`。
```js
async (getUserInput) => {
@@ -264,7 +264,7 @@ async (getUserInput) => {
};
```
-When the `PUT` request sent to `/api/issues/{projectname}` does not include update fields, the return value is `{ error: 'no update field(s) sent', '_id': _id }`. On any other error, the return value is `{ error: 'could not update', '_id': _id }`.
+当 `PUT` 请求发送给 `/api/issues/{projectname}` 的请求体不包含任何更新的字段,应返回 `{ error: 'no update field(s) sent', '_id': _id }`。 在任何其他错误,应返回 `{ error: 'could not update', '_id': _id }`。
```js
async (getUserInput) => {
@@ -294,7 +294,7 @@ async (getUserInput) => {
};
```
-You can send a `DELETE` request to `/api/issues/{projectname}` with an `_id` to delete an issue. If no `_id` is sent, the return value is `{ error: 'missing _id' }`. On success, the return value is `{ result: 'successfully deleted', '_id': _id }`. On failure, the return value is `{ error: 'could not delete', '_id': _id }`.
+你可以发送一个 `DELETE` 请求到 `/api/issues/{projectname}` 带有一个 `_id` 来删除 issue。 如果没有发送 `_id` ,返回值为 `{ error: 'missing _id' }`。 成功后,返回值为 `{ result: 'successfully deleted', '_id': _id }`。 失败时,返回值为 `{ error: 'could not delete', '_id': _id }`。
```js
async (getUserInput) => {
@@ -336,7 +336,7 @@ async (getUserInput) => {
};
```
-All 14 functional tests are complete and passing.
+所有 14 项功能测试都已完成并通过。
```js
async (getUserInput) => {
diff --git a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md
index a448bda36d..666f7b3e38 100644
--- a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md
+++ b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md
@@ -1,6 +1,6 @@
---
id: 587d8249367417b2b2512c41
-title: Metric-Imperial Converter
+title: 公制 - 英制转换器
challengeType: 4
forumTopicId: 301570
dashedName: metric-imperial-converter
@@ -8,52 +8,52 @@ dashedName: metric-imperial-converter
# --description--
-Build a full stack JavaScript app that is functionally similar to this: . Working on this project will involve you writing your code using one of the following methods:
+构建一个 JavaScript 的全栈应用,在功能上与这个应用相似:。 可以采用下面的任意一种方式完成这个挑战:
-- Clone [this GitHub repo](https://github.com/freeCodeCamp/boilerplate-project-metricimpconverter/) and complete your project locally.
-- Use [our repl.it starter project](https://repl.it/github/freeCodeCamp/boilerplate-project-metricimpconverter) to complete your project.
-- Use a site builder of your choice to complete the project. Be sure to incorporate all the files from our GitHub repo.
+- 克隆 [GitHub 仓库](https://github.com/freeCodeCamp/boilerplate-project-metricimpconverter/) 并在本地完成你的项目。
+- 使用 [repl.it 上的初始化项目](https://repl.it/github/freeCodeCamp/boilerplate-project-metricimpconverter) 来完成项目。
+- 使用一个你喜欢的站点生成器来完成项目。 需要确定包含了我们 GitHub 仓库的所有文件。
-When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field.
+完成本项目后,请将一个正常运行的 demo(项目演示)托管在可以公开访问的平台。 然后在 `Solution Link` 框中提交你的项目 URL。 此外,还可以将项目的源码提交到 `GitHub Link` 中。
# --instructions--
-- Complete the necessary conversion logic in `/controllers/convertHandler.js`
-- Complete the necessary routes in `/routes/api.js`
-- Copy the `sample.env` file to `.env` and set the variables appropriately
-- To run the tests uncomment `NODE_ENV=test` in your `.env` file
-- To run the tests in the console, use the command `npm run test`. To open the Repl.it console, press Ctrl+Shift+P (Cmd if on a Mac) and type "open shell"
+- 在 `/controllers/convertHandler.js` 中完成必要的转换逻辑
+- 在 `/routes/api.js` 中完成必要的路由
+- 复制 `sample.env` 文件到 `.env` 并按需设置变量
+- 在 `.env` 文件中取消注释 `NODE_ENV=test` 来运行测试
+- 使用 `npm run test` 命令在 console 中运行测试。 按 Ctrl+Shift+P (在 Mac 上是 Cmd+Shift+P) 并输入"open shell",打开 Repl.it 控制台。
-Write the following tests in `tests/1_unit-tests.js`:
+在 `tests/1_unit-tests.js` 中写下以下测试:
-- `convertHandler` should correctly read a whole number input.
-- `convertHandler` should correctly read a decimal number input.
-- `convertHandler` should correctly read a fractional input.
-- `convertHandler` should correctly read a fractional input with a decimal.
-- `convertHandler` should correctly return an error on a double-fraction (i.e. `3/2/3`).
-- `convertHandler` should correctly default to a numerical input of `1` when no numerical input is provided.
-- `convertHandler` should correctly read each valid input unit.
-- `convertHandler` should correctly return an error for an invalid input unit.
-- `convertHandler` should return the correct return unit for each valid input unit.
-- `convertHandler` should correctly return the spelled-out string unit for each valid input unit.
-- `convertHandler` should correctly convert `gal` to `L`.
-- `convertHandler` should correctly convert `L` to `gal`.
-- `convertHandler` should correctly convert `mi` to `km`.
-- `convertHandler` should correctly convert `km` to `mi`.
-- `convertHandler` should correctly convert `lbs` to `kg`.
-- `convertHandler` should correctly convert `kg` to `lbs`.
+- `convertHandler` 应该正确地读取整个数字输入。
+- `convertHandler` 应该正确地读取十进制数字输入。
+- `convertHandler` 应该正确地读取一个分数输入。
+- `convertHandler` 应该正确地读取一个带小数点的分数输入。
+- `convertHandler` 当输入双分数时应该返回错误 ( `3/2/3`)。
+- `convertHandler` 在没有提供数字输入时应该默认为 `1`。
+- `convertHandler` 应该正确地读取每个有效的单位输入。
+- `convertHandler` 在输入无效单位时应返回错误。
+- `convertHandler` 在输入有效单位时应返回正确的单位。
+- `convertHandler` 应该正确返回每个有效输入单位的拼写字符串。
+- `convertHandler` 应该正确地将 `gal` 转换为 `L`。
+- `convertHandler` 应该正确地将 `L` 转换为 `gal`。
+- `convertHandler` 应该正确地将 `mi` 转换为 `km`。
+- `convertHandler` 应该正确地将 `km` 转换为 `mi`。
+- `convertHandler` 应该正确地将 `lbs` 转换为 `kg`。
+- `convertHandler` 应该正确地将 `kg` 转换为 `lbs`。
-Write the following tests in `tests/2_functional-tests.js`:
+在 `tests/2_functional-tests.js` 中写下以下测试:
-- Convert a valid input such as `10L`: `GET` request to `/api/convert`.
-- Convert an invalid input such as `32g`: `GET` request to `/api/convert`.
-- Convert an invalid number such as `3/7.2/4kg`: `GET` request to `/api/convert`.
-- Convert an invalid number AND unit such as `3/7.2/4kilomegagram`: `GET` request to `/api/convert`.
-- Convert with no number such as `kg`: `GET` request to `/api/convert`.
+- 将有效的输入转换为 `10L`: `GET` 请求到 `/api/convert`。
+- 转换无效的输如 `32g`: `GET` 请求到 `/api/convert`.
+- 转换无效的数字,例如 `3/7.2/4kg`: `GET` 请求到 `/api/convert`。
+- 转换无效的数字和单位如 `3/7.2/4kilomegagram`: `GET` 请求到 `/api/convert`.
+- 转换时没有数字,例如 `kg`: `GET` 请求到 `/api/convert`。
# --hints--
-You can provide your own project, not the example URL.
+提交自己的项目,而不是示例的 URL。
```js
getUserInput => {
@@ -65,11 +65,13 @@ getUserInput => {
};
```
-You can `GET` `/api/convert` with a single parameter containing an accepted number and unit and have it converted. (Hint: Split the input by looking for the index of the first character which will mark the start of the unit)
+通过 `GET` 请求 `/api/convert`,传入数字和单位的单个参数,可以将其转换。 (提示:通过寻找第一个字符的索引来分割输入,这将标记单位的开始)
+
```js
+
```
-You can convert `'gal'` to `'L'` and vice versa. (1 gal to 3.78541 L)
+可以将 `'gal'` 转换为 `'L'`,反之亦然。 (1 gal to 3.78541 L)
```js
async getUserInput => {
@@ -92,7 +94,7 @@ async getUserInput => {
};
```
-You can convert `'lbs'` to `'kg'` and vice versa. (1 lbs to 0.453592 kg)
+可以将 `'lbs'` 转换为 `'kg'`,反之亦然。 (1 lbs to 0.453592 kg)
```js
async getUserInput => {
@@ -115,7 +117,7 @@ async getUserInput => {
};
```
-You can convert `'mi'` to `'km'` and vice versa. (1 mi to 1.60934 km)
+你可以将 `'mi'` 转换为 `'km'` 反之亦然。 (1 mi to 1.60934 km)
```js
async getUserInput => {
@@ -138,7 +140,7 @@ async getUserInput => {
};
```
-All incoming units should be accepted in both upper and lower case, but should be returned in both the `initUnit` and `returnUnit` in lower case, except for liter, which should be represented as an uppercase `'L'`.
+所有输入单位以大写和小写形式都应该被接受,但在 `initUnit` 和 `returnUnit` 中应以小写形式返回,升除外,应将其表示为大写的 `'L'`。
```js
async getUserInput => {
@@ -161,7 +163,7 @@ async getUserInput => {
};
```
-If the unit of measurement is invalid, returned will be `'invalid unit'`.
+如果测量单位无效,返回将为 `'invalid unit'`。
```js
async getUserInput => {
@@ -174,7 +176,7 @@ async getUserInput => {
};
```
-If the number is invalid, returned will be `'invalid number'`.
+如果数字无效,返回将为 `'invalid number'`。
```js
async getUserInput => {
@@ -189,7 +191,7 @@ async getUserInput => {
};
```
-If both the unit and number are invalid, returned will be `'invalid number and unit'`.
+如果单位和数字都无效,返回将为 `'invalid number and unit'`。
```js
async getUserInput => {
@@ -207,7 +209,7 @@ async getUserInput => {
};
```
-You can use fractions, decimals or both in the parameter (ie. 5, 1/2, 2.5/6), but if nothing is provided it will default to 1.
+可以在参数中使用分数、小数或小数分数 (例如 5, 1/2, 2.5/6),如果没有提供任何内容,则默认值为 1。
```js
async getUserInput => {
@@ -238,7 +240,7 @@ async getUserInput => {
};
```
-Your return will consist of the `initNum`, `initUnit`, `returnNum`, `returnUnit`, and `string` spelling out units in the format `'{initNum} {initUnitString} converts to {returnNum} {returnUnitString}'` with the result rounded to 5 decimals.
+返回将包含 `initNum`、`initUnit`、`returnNum`、`returnUnit` 和 `string` 拼写单位格式 `'{initNum} {initUnitString} converts to {returnNum} {returnUnitString}'` 结果四舍五入为 5 小数。
```js
async getUserInput => {
@@ -255,7 +257,7 @@ async getUserInput => {
};
```
-All 16 unit tests are complete and passing.
+所有 16 个单元的测试都已完成并通过。
```js
async getUserInput => {
@@ -280,7 +282,7 @@ async getUserInput => {
};
```
-All 5 functional tests are complete and passing.
+所有 5 项功能测试都已完成并通过。
```js
async getUserInput => {
diff --git a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/personal-library.md b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/personal-library.md
index 6cd072b446..4ad239d99b 100644
--- a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/personal-library.md
+++ b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/personal-library.md
@@ -1,6 +1,6 @@
---
id: 587d824a367417b2b2512c43
-title: Personal Library
+title: 个人图书馆
challengeType: 4
forumTopicId: 301571
dashedName: personal-library
@@ -8,25 +8,25 @@ dashedName: personal-library
# --description--
-Build a full stack JavaScript app that is functionally similar to this: . Working on this project will involve you writing your code using one of the following methods:
+构建一个 JavaScript 的全栈应用,在功能上与这个应用相似:。 可以采用下面的任意一种方式完成这个挑战:
-- Clone [this GitHub repo](https://github.com/freeCodeCamp/boilerplate-project-library) and complete your project locally.
-- Use [our repl.it starter project](https://repl.it/github/freeCodeCamp/boilerplate-project-library)) to complete your project.
-- Use a site builder of your choice to complete the project. Be sure to incorporate all the files from our GitHub repo.
+- 克隆 [这个 GitHub 仓库](https://github.com/freeCodeCamp/boilerplate-project-library) 并在本地完成项目。
+- 使用 [repl.it 上的初始化项目](https://repl.it/github/freeCodeCamp/boilerplate-project-library) 来完成项目。
+- 使用一个你喜欢的站点生成器来完成项目。 需要确定包含了我们 GitHub 仓库的所有文件。
-When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field.
+完成本项目后,请将一个正常运行的 demo(项目演示)托管在可以公开访问的平台。 然后在 `Solution Link` 框中提交你的项目 URL。 此外,还可以将项目的源码提交到 `GitHub Link` 中。
# --instructions--
-1. Add your MongoDB connection string to `.env` without quotes as `DB`
- Example: `DB=mongodb://admin:pass@1234.mlab.com:1234/fccpersonallib`
-2. In your `.env` file set `NODE_ENV` to `test`, without quotes
-3. You need to create all routes within `routes/api.js`
-4. You will create all functional tests in `tests/2_functional-tests.js`
+1. 将的 MongoDB 连接字符串添加到 `.env` 中(没有引号),`DB`
+ 示例: `DB=mongodb://admin:pass@1234.mlab.com:1234/fccpersonallib`
+2. 在 `.env` 文件中设置 `NODE_ENV` 为 `test`中,没有引号
+3. 需要在 `routes/api.js` 中创建所有路由
+4. 在 `tests/2_functional-tests.js` 中创建所有的功能测试
# --hints--
-You can provide your own project, not the example URL.
+提交自己的项目,而不是示例的 URL。
```js
(getUserInput) => {
@@ -36,7 +36,7 @@ You can provide your own project, not the example URL.
};
```
-You can send a POST request to `/api/books` with `title` as part of the form data to add a book. The returned response will be an object with the `title` and a unique `_id` as keys. If `title` is not included in the request, the returned response should be the string `missing required field title`.
+可以发送 POST 请求到 `/api/books`,带有 `title` 作为表单数据的一部分,来添加一本书。 返回的响应将是一个包含 `title` 和唯一的 `_id` 作为键的对象。 如果 `title` 未包含在请求中,返回的响应应该是字符串 `missing required field title`。
```js
async (getUserInput) => {
@@ -57,7 +57,7 @@ async (getUserInput) => {
};
```
-You can send a GET request to `/api/books` and receive a JSON response representing all the books. The JSON response will be an array of objects with each object (book) containing `title`, `_id`, and `commentcount` properties.
+可以向 `/api/books` 发送 GET 请求,并返回代表所有书的 JSON 响应。 JSON 响应应该是一个包含有 `title`、`_id` 和 `commentcount` 属性的对象数组 。
```js
async (getUserInput) => {
@@ -85,7 +85,7 @@ async (getUserInput) => {
};
```
-You can send a GET request to `/api/books/{_id}` to retrieve a single object of a book containing the properties `title`, `_id`, and a `comments` array (empty array if no comments present). If no book is found, return the string `no book exists`.
+可以发送 GET 请求到 `/api/books/{_id}` 来检索一本书的单个对象,返回属性 `title`、`_id` 和 `comments` 数组 (如果没有评论,则展示空数组)。 如果找不到书, 返回字符串 `no book exists`。
```js
async (getUserInput) => {
@@ -109,7 +109,7 @@ async (getUserInput) => {
};
```
-You can send a POST request containing `comment` as the form body data to `/api/books/{_id}` to add a comment to a book. The returned response will be the books object similar to GET `/api/books/{_id}` request in an earlier test. If `comment` is not included in the request, return the string `missing required field comment`. If no book is found, return the string `no book exists`.
+可以发送一个 POST 请求,其中包含 `comment` 作为表单正文数据,请求到 `/api/books/{_id}` 以便将评论添加到书中。 返回的响应将是书对象,在先前测试中 GET `/api/books/{_id}` 类似。 如果请求中没有包含 `comment` ,返回字符串 `missing required field comment`。 如果找不到书, 返回字符串 `no book exists`。
```js
async (getUserInput) => {
@@ -147,7 +147,7 @@ async (getUserInput) => {
};
```
-You can send a DELETE request to `/api/books/{_id}` to delete a book from the collection. The returned response will be the string `delete successful` if successful. If no book is found, return the string `no book exists`.
+可以向 `/api/books/{_id}` 发送 DELETE 请求,从收藏中删除一本书。 如果成功,返回的响应将是字符串 `delete successful`。 如果找不到书, 返回字符串 `no book exists`。
```js
async (getUserInput) => {
@@ -171,7 +171,7 @@ async (getUserInput) => {
};
```
-You can send a DELETE request to `/api/books` to delete all books in the database. The returned response will be the string `'complete delete successful` if successful.
+可以向 `/api/books` 发送 DELETE 请求来删除数据库中的所有书籍。 如果成功,返回的响应将是字符串 `'complete delete successful`。
```js
async (getUserInput) => {
@@ -188,7 +188,7 @@ async (getUserInput) => {
};
```
-All 10 functional tests required are complete and passing.
+所有 10 项功能测试都已完成并通过。
```js
async (getUserInput) => {
diff --git a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/sudoku-solver.md b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/sudoku-solver.md
index dde3301c58..4105fef19c 100644
--- a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/sudoku-solver.md
+++ b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/sudoku-solver.md
@@ -1,66 +1,66 @@
---
id: 5e601bf95ac9d0ecd8b94afd
-title: Sudoku Solver
+title: 数独求解器
challengeType: 4
dashedName: sudoku-solver
---
# --description--
-Build a full stack JavaScript app that is functionally similar to this: . Working on this project will involve you writing your code using one of the following methods:
+构建一个 JavaScript 的全栈应用,在功能上与这个应用相似:。 可以采用下面的任意一种方式完成这个挑战:
-- Clone [this GitHub repo](https://github.com/freecodecamp/boilerplate-project-sudoku-solver) and complete your project locally.
-- Use [our repl.it starter project](https://repl.it/github/freeCodeCamp/boilerplate-project-sudoku-solver) to complete your project.
-- Use a site builder of your choice to complete the project. Be sure to incorporate all the files from our GitHub repo.
+- 克隆 [GitHub 仓库](https://github.com/freecodecamp/boilerplate-project-sudoku-solver) 并在本地完成你的项目。
+- 使用 [repl.it 初始化项目](https://repl.it/github/freeCodeCamp/boilerplate-project-sudoku-solver) 来完成项目。
+- 使用一个你喜欢的站点生成器来完成项目。 需要确定包含了我们 GitHub 仓库的所有文件。
-When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field.
+完成本项目后,请将一个正常运行的 demo(项目演示)托管在可以公开访问的平台。 然后在 `Solution Link` 框中提交你的项目 URL。 此外,还可以将项目的源码提交到 `GitHub Link` 中。
# --instructions--
-- All puzzle logic can go into `/controllers/sudoku-solver.js`
- - The `validate` function should take a given puzzle string and check it to see if it has 81 valid characters for the input.
- - The `check` functions should be validating against the *current* state of the board.
- - The `solve` function should handle solving any given valid puzzle string, not just the test inputs and solutions. You are expected to write out the logic to solve this.
-- All routing logic can go into `/routes/api.js`
-- See the `puzzle-strings.js` file in `/controllers` for some sample puzzles your application should solve
-- To run the challenge tests on this page, set `NODE_ENV` to `test` without quotes in the `.env` file
-- To run the tests in the console, use the command `npm run test`. To open the Repl.it console, press Ctrl+Shift+P (Cmd if on a Mac) and type "open shell"
+- 所有解谜逻辑都可以进入 `/controllers/sudoku-solver.js`
+ - `validate` 函数应该使用给定的解谜字符串,然后检查它是否是 81 个有效的输入字符。
+ - `check` 函数应对棋盘的 *current* 进行验证。
+ - `solve` 函数应该处理任何给定的解谜字符串,而不仅仅是测试输入和解决方法。 你需要写出解决这个问题的逻辑。
+- 所有路由逻辑都可以进入 `/routes/api.js`
+- 阅读 `/controllers` 中的 `puzzle-strings.js` 文件来了解一些应用程序应该解决的示例谜题
+- 在 `.env` 文件中将 `NODE_ENV` 设置为 `test` (没有引号),运行这个页面的挑战测试。
+- 使用 `npm run test` 命令在 console 中运行测试。 按 Ctrl+Shift+P (在 Mac 上是 Cmd+Shift+P) 并输入"open shell",打开 Repl.it 控制台。
-Write the following tests in `tests/1_unit-tests.js`:
+在 `tests/1_unit-tests.js` 中写下以下测试:
-- Logic handles a valid puzzle string of 81 characters
-- Logic handles a puzzle string with invalid characters (not 1-9 or `.`)
-- Logic handles a puzzle string that is not 81 characters in length
-- Logic handles a valid row placement
-- Logic handles an invalid row placement
-- Logic handles a valid column placement
-- Logic handles an invalid column placement
-- Logic handles a valid region (3x3 grid) placement
-- Logic handles an invalid region (3x3 grid) placement
-- Valid puzzle strings pass the solver
-- Invalid puzzle strings fail the solver
-- Solver returns the the expected solution for an incomplete puzzzle
+- 逻辑处理 81 个字符的解谜字符串
+- 逻辑处理无效的解谜字符串 (不是 1-9 或 `.`)
+- 逻辑处理一个长度不是 81 个字符的解谜字符串
+- 逻辑处理有效行的位置
+- 逻辑处理无效行的位置
+- 逻辑处理一个有效的列位置
+- 逻辑处理无效列位置
+- 逻辑处理一个有效的区域 (3x3 网格)
+- 逻辑处理一个无效的区域 (3x3 网格)
+- 有效解谜字符串通过 solver
+- 无效解谜字符串无法通过 solver
+- solver 返回一个不完整谜题的的预期解决方案
-Write the following tests in `tests/2_functional-tests.js`
+在 `tests/2_functional-tests.js` 中编写下以下测试:
-- Solve a puzzle with valid puzzle string: POST request to `/api/solve`
-- Solve a puzzle with missing puzzle string: POST request to `/api/solve`
-- Solve a puzzle with invalid characters: POST request to `/api/solve`
-- Solve a puzzle with incorrect length: POST request to `/api/solve`
-- Solve a puzzle that cannot be solved: POST request to `/api/solve`
-- Check a puzzle placement with all fields: POST request to `/api/check`
-- Check a puzzle placement with single placement conflict: POST request to `/api/check`
-- Check a puzzle placement with multiple placement conflicts: POST request to `/api/check`
-- Check a puzzle placement with all placement conflicts: POST request to `/api/check`
-- Check a puzzle placement with missing required fields: POST request to `/api/check`
-- Check a puzzle placement with invalid characters: POST request to `/api/check`
-- Check a puzzle placement with incorrect length: POST request to `/api/check`
-- Check a puzzle placement with invalid placement coordinate: POST request to `/api/check`
-- Check a puzzle placement with invalid placement value: POST request to `/api/check`
+- 用有效的解谜字符串解决一个谜题:POST 请求到 `/api/solve`
+- 用缺失的解谜字符串解决一个谜题:POST 请求到 `/api/solve`
+- 用无效字符解决一个谜题:POST 请求到 `/api/solve`
+- 用不正确的长度解决一个谜题:POST 请求到 `/api/solve`
+- 解决一个无法解决的谜题:POST 请求到 `/api/solve`
+- 检查所有字段的解谜位置:POST 请求到 `/api/check`
+- 用单个位置冲突检查解谜位置:POST 请求到 `/api/check`
+- 检查一个有多个位置冲突的解谜位置: POST 请求到 `/api/check`
+- 检查与所有位置冲突的解谜位置: POST 请求到 `/api/check`
+- 检查缺失所需字段的解谜位置:POST 请求到 `/api/check`
+- 检查一个有无效字符的解谜位置: POST 请求到 `/api/check`
+- 检查不正确长度的解谜位置:POST 请求到 `/api/check`
+- 检查一个无效的放置坐标的解谜位置:POST 请求到 `/api/check`
+- 检查具有无效的放置值的解谜位置:POST 请求到 `/api/check`
# --hints--
-You should provide your own project, not the example URL.
+提交自己的项目,而不是示例的 URL。
```js
(getUserInput) => {
@@ -69,7 +69,7 @@ You should provide your own project, not the example URL.
};
```
-You can `POST` `/api/solve` with form data containing `puzzle` which will be a string containing a combination of numbers (1-9) and periods `.` to represent empty spaces. The returned object will contain a `solution` property with the solved puzzle.
+可以发送 `POST` 请求到 `/api/solve`,使用包含 `puzzle` 的表单数据这将是一个包含数字 (1-9) 和点号的字符串组合,`.` 表示空格。 返回的对象将包含一个 `solution` 属性与解决的谜题。
```js
async (getUserInput) => {
@@ -88,7 +88,7 @@ async (getUserInput) => {
};
```
-If the object submitted to `/api/solve` is missing `puzzle`, the returned value will be `{ error: 'Required field missing' }`
+如果提交给 `/api/solve` 的对象缺失 `puzzle`,返回的值将是 `{ error: 'Required field missing' }`
```js
async (getUserInput) => {
@@ -106,7 +106,7 @@ async (getUserInput) => {
};
```
-If the puzzle submitted to `/api/solve` contains values which are not numbers or periods, the returned value will be `{ error: 'Invalid characters in puzzle' }`
+如果提交给 `/api/solve` 谜题包含非数字或点号的值。 返回的值将是 `{ error: 'Invalid characters in puzzle' }`
```js
async (getUserInput) => {
@@ -124,7 +124,7 @@ async (getUserInput) => {
};
```
-If the puzzle submitted to `/api/solve` is greater or less than 81 characters, the returned value will be `{ error: 'Expected puzzle to be 81 characters long' }`
+如果提交给 `/api/solve` 的谜题大于或小于 81 个字符, 返回的值将是 `{ error: 'Expected puzzle to be 81 characters long' }`
```js
async (getUserInput) => {
@@ -142,7 +142,7 @@ async (getUserInput) => {
};
```
-If the puzzle submitted to `/api/solve` is invalid or cannot be solved, the returned value will be `{ error: 'Puzzle cannot be solved' }`
+如果提交给 `/api/solve` 的谜题无效或无法解决, 返回的值将是 `{ error: 'Puzzle cannot be solved' }`
```js
async (getUserInput) => {
@@ -160,7 +160,7 @@ async (getUserInput) => {
};
```
-You can `POST` to `/api/check` an object containing `puzzle`, `coordinate`, and `value` where the `coordinate` is the letter A-I indicating the row, followed by a number 1-9 indicating the column, and `value` is a number from 1-9.
+可以发送 `POST` 请求到 `/api/check`,包含 `puzzle`、`coordinate` 和 `value` 的对象,其中 `coordinate` 是表示行的字母 A-I,后跟表示列的数字 1-9,而 `value` 是 1-9 的数字。
```js
async (getUserInput) => {
@@ -179,7 +179,7 @@ async (getUserInput) => {
};
```
-The return value from the `POST` to `/api/check` will be an object containing a `valid` property, which is `true` if the number may be placed at the provided coordinate and `false` if the number may not. If false, the returned object will also contain a `conflict` property which is an array containing the strings `"row"`, `"column"`, and/or `"region"` depending on which makes the placement invalid.
+发送 `POST` 请求到 `/api/check`,返回值是一个包含 `valid` 属性的对象,如果数字可能放置在提供的坐标中则是 `true`,否则是`false`。 如果错误,返回的对象还将包含一个 `conflict` 属性,它是一个字符串 `"row"`、`"column"`, 和/或 取决于哪个区域使位置无效的`"region"` 。
```js
async (getUserInput) => {
@@ -202,7 +202,26 @@ async (getUserInput) => {
};
```
-If the puzzle submitted to `/api/check` contains values which are not numbers or periods, the returned value will be `{ error: 'Invalid characters in puzzle' }`
+如果提交给 `/api/check` 的 `value` 已放置在该 `coordinate` 上的 `puzzle`中,如果 `value` 不冲突,则返回的是 `valid` 属性为 `true` 的对象。
+
+```js
+async (getUserInput) => {
+ const input =
+ '..9..5.1.85.4....2432......1...69.83.9.....6.62.71...9......1945....4.37.4.3..6..';
+ const coordinate = 'C3';
+ const value = '2';
+ const data = await fetch(getUserInput('url') + '/api/check', {
+ method: 'POST',
+ headers: { 'Content-Type': 'application/json' },
+ body: JSON.stringify({ puzzle: input, coordinate, value })
+ });
+ const parsed = await data.json();
+ assert.property(parsed, 'valid');
+ assert.isTrue(parsed.valid);
+};
+```
+
+如果提交给 `/api/check` 的谜题包含非数字或点号的值。 返回的值将是 `{ error: 'Invalid characters in puzzle' }`
```js
async (getUserInput) => {
@@ -222,7 +241,7 @@ async (getUserInput) => {
};
```
-If the puzzle submitted to `/api/check` is greater or less than 81 characters, the returned value will be `{ error: 'Expected puzzle to be 81 characters long' }`
+如果提交给 `/api/check` 的谜题大于或小于 81 个字符, 返回的值将是 `{ error: 'Expected puzzle to be 81 characters long' }`
```js
async (getUserInput) => {
@@ -242,7 +261,7 @@ async (getUserInput) => {
};
```
-If the object submitted to `/api/check` is missing `puzzle`, `coordinate` or `value`, the returned value will be `{ error: Required field(s) missing }`
+如果提交给 `/api/check` 的对象缺失 `puzzle`、`coordinate` 或 `value`,返回的值将是 `{ error: Required field(s) missing }`
```js
async (getUserInput) => {
@@ -260,7 +279,7 @@ async (getUserInput) => {
};
```
-If the coordinate submitted to `api/check` does not point to an existing grid cell, the returned value will be `{ error: 'Invalid coordinate'}`
+如果提交给 `api/check` 的坐标不指向现有的网格单元格, 返回的值将是 `{ error: 'Invalid coordinate'}`
```js
async (getUserInput) => {
@@ -280,7 +299,7 @@ async (getUserInput) => {
};
```
-If the `value` submitted to `/api/check` is not a number between 1 and 9, the returned values will be `{ error: 'Invalid value' }`
+如果提交给 `/api/check` 的 `value` 不是一个介于 1 到 9 之间的数字,则返回的值将是 `{ error: 'Invalid value' }`
```js
async (getUserInput) => {
@@ -300,7 +319,7 @@ async (getUserInput) => {
};
```
-All 12 unit tests are complete and passing. See `/tests/1_unit-tests.js` for the expected behavior you should write tests for.
+所有 12 个单元的测试都已完成并通过。 请参阅 `/tests/1_unit-tests.js` 来了解你应该写的测试的预期行为。
```js
async (getUserInput) => {
@@ -323,7 +342,7 @@ async (getUserInput) => {
};
```
-All 14 functional tests are complete and passing. See `/tests/2_functional-tests.js` for the functionality you should write tests for.
+所有 14 项功能测试都已完成并通过。 请参阅 `/tests/2_functional-tests.js` 来了解你应该编写的测试的功能。
```js
async (getUserInput) => {
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/convert-html-entities.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/convert-html-entities.md
index 707290ef0c..8f3d23a488 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/convert-html-entities.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/convert-html-entities.md
@@ -1,6 +1,6 @@
---
id: a6b0bb188d873cb2c8729495
-title: Convert HTML Entities
+title: Convierte entidades HTML
challengeType: 5
forumTopicId: 16007
dashedName: convert-html-entities
@@ -8,17 +8,17 @@ dashedName: convert-html-entities
# --description--
-Convert the characters `&`, `<`, `>`, `"` (double quote), and `'` (apostrophe), in a string to their corresponding HTML entities.
+Convierte los caracteres `&`, `<`, `>`, `"` (dobles comillas), y `'` (apóstrofo), en un cadena con su correspondiente entidad HTML.
# --hints--
-`convertHTML("Dolce & Gabbana")` should return `"Dolce & Gabbana"`.
+`convertHTML("Dolce & Gabbana")` debe devolver la cadena `Dolce & Gabbana`.
```js
assert.match(convertHTML('Dolce & Gabbana'), /Dolce & Gabbana/);
```
-`convertHTML("Hamburgers < Pizza < Tacos")` should return `"Hamburgers < Pizza < Tacos"`.
+`convertHTML("Hamburgers < Pizza < Tacos")` debe devolver la cadena `Hamburgers < Pizza < Tacos`.
```js
assert.match(
@@ -27,13 +27,13 @@ assert.match(
);
```
-`convertHTML("Sixty > twelve")` should return `"Sixty > twelve"`.
+`convertHTML("Sixty > twelve")` debe devolver la cadena `Sixty > twelve`.
```js
assert.match(convertHTML('Sixty > twelve'), /Sixty > twelve/);
```
-`convertHTML('Stuff in "quotation marks"')` should return `"Stuff in "quotation marks""`.
+`convertHTML('Stuff in "quotation marks"')` debe devolver la cadena `Stuff in "quotation marks"`.
```js
assert.match(
@@ -42,19 +42,19 @@ assert.match(
);
```
-`convertHTML("Schindler's List")` should return `"Schindler's List"`.
+`convertHTML("Schindler's List")` debe devolver la cadena `Schindler's List`.
```js
assert.match(convertHTML("Schindler's List"), /Schindler's List/);
```
-`convertHTML("<>")` should return `"<>"`.
+`convertHTML("<>")` debe devolver la cadena `<>`.
```js
assert.match(convertHTML('<>'), /<>/);
```
-`convertHTML("abc")` should return `"abc"`.
+`convertHTML("abc")` debe devolver la cadena `abc`.
```js
assert.strictEqual(convertHTML('abc'), 'abc');
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/diff-two-arrays.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/diff-two-arrays.md
index 228d55cf80..056817c90c 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/diff-two-arrays.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/diff-two-arrays.md
@@ -1,6 +1,6 @@
---
id: a5de63ebea8dbee56860f4f2
-title: Diff Two Arrays
+title: Diferencia entre dos arreglos
challengeType: 5
forumTopicId: 16008
dashedName: diff-two-arrays
@@ -8,20 +8,19 @@ dashedName: diff-two-arrays
# --description--
-Compare two arrays and return a new array with any items only found in one of the two given arrays, but not both. In other words, return the symmetric difference of the two arrays.
+Compara dos arreglos y devuelve un nuevo arreglo con los elementos que sólo se encuentran en uno de los dos arreglos dados, pero no en ambos. En otras palabras, devuelve la diferencia simétrica de los dos arreglos.
-**Note**
-You can return the array with its elements in any order.
+**Nota:**Puedes devolver el arreglo con sus elementos en cualquier orden.
# --hints--
-`diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5])` should return an array.
+`diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5])` debe devolver un arreglo.
```js
assert(typeof diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]) === 'object');
```
-`["diorite", "andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]` should return `["pink wool"]`.
+`["diorite", "andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]` debe devolver `["pink wool"]`.
```js
assert.sameMembers(
@@ -33,7 +32,7 @@ assert.sameMembers(
);
```
-`["diorite", "andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]` should return an array with one item.
+`["diorite", "andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]` debe devolver un arreglo con un elemento.
```js
assert(
@@ -44,7 +43,7 @@ assert(
);
```
-`["andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]` should return `["diorite", "pink wool"]`.
+`["andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]` debe devolver `["diorite", "pink wool"]`.
```js
assert.sameMembers(
@@ -56,7 +55,7 @@ assert.sameMembers(
);
```
-`["andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]` should return an array with two items.
+`["andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]` debe devolver un arreglo con dos elementos.
```js
assert(
@@ -67,7 +66,7 @@ assert(
);
```
-`["andesite", "grass", "dirt", "dead shrub"], ["andesite", "grass", "dirt", "dead shrub"]` should return `[]`.
+`["andesite", "grass", "dirt", "dead shrub"], ["andesite", "grass", "dirt", "dead shrub"]` debe devolver `[]`.
```js
assert.sameMembers(
@@ -79,7 +78,7 @@ assert.sameMembers(
);
```
-`["andesite", "grass", "dirt", "dead shrub"], ["andesite", "grass", "dirt", "dead shrub"]` should return an empty array.
+`["andesite", "grass", "dirt", "dead shrub"], ["andesite", "grass", "dirt", "dead shrub"]` debe devolver un arreglo vacío.
```js
assert(
@@ -90,19 +89,19 @@ assert(
);
```
-`[1, 2, 3, 5], [1, 2, 3, 4, 5]` should return `[4]`.
+`[1, 2, 3, 5], [1, 2, 3, 4, 5]` debe devolver `[4]`.
```js
assert.sameMembers(diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]), [4]);
```
-`[1, 2, 3, 5], [1, 2, 3, 4, 5]` should return an array with one item.
+`[1, 2, 3, 5], [1, 2, 3, 4, 5]` debe devolver un arreglo con un elemento.
```js
assert(diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]).length === 1);
```
-`[1, "calf", 3, "piglet"], [1, "calf", 3, 4]` should return `["piglet", 4]`.
+`[1, "calf", 3, "piglet"], [1, "calf", 3, 4]` debe devolver `["piglet", 4]`.
```js
assert.sameMembers(diffArray([1, 'calf', 3, 'piglet'], [1, 'calf', 3, 4]), [
@@ -111,13 +110,13 @@ assert.sameMembers(diffArray([1, 'calf', 3, 'piglet'], [1, 'calf', 3, 4]), [
]);
```
-`[1, "calf", 3, "piglet"], [1, "calf", 3, 4]` should return an array with two items.
+`[1, "calf", 3, "piglet"], [1, "calf", 3, 4]` debe devolver un arreglo con dos elementos.
```js
assert(diffArray([1, 'calf', 3, 'piglet'], [1, 'calf', 3, 4]).length === 2);
```
-`[], ["snuffleupagus", "cookie monster", "elmo"]` should return `["snuffleupagus", "cookie monster", "elmo"]`.
+`[], ["snuffleupagus", "cookie monster", "elmo"]` debe devolver `["snuffleupagus", "cookie monster", "elmo"]`.
```js
assert.sameMembers(diffArray([], ['snuffleupagus', 'cookie monster', 'elmo']), [
@@ -127,13 +126,13 @@ assert.sameMembers(diffArray([], ['snuffleupagus', 'cookie monster', 'elmo']), [
]);
```
-`[], ["snuffleupagus", "cookie monster", "elmo"]` should return an array with three items.
+`[], ["snuffleupagus", "cookie monster", "elmo"]` debe devolver un arreglo con tres elementos.
```js
assert(diffArray([], ['snuffleupagus', 'cookie monster', 'elmo']).length === 3);
```
-`[1, "calf", 3, "piglet"], [7, "filly"]` should return `[1, "calf", 3, "piglet", 7, "filly"]`.
+`[1, "calf", 3, "piglet"], [7, "filly"]` debe devolver `[1, "calf", 3, "piglet", 7, "filly"]`.
```js
assert.sameMembers(diffArray([1, 'calf', 3, 'piglet'], [7, 'filly']), [
@@ -146,7 +145,7 @@ assert.sameMembers(diffArray([1, 'calf', 3, 'piglet'], [7, 'filly']), [
]);
```
-`[1, "calf", 3, "piglet"], [7, "filly"]` should return an array with six items.
+`[1, "calf", 3, "piglet"], [7, "filly"]` debe devolver un arreglo con seis elementos.
```js
assert(diffArray([1, 'calf', 3, 'piglet'], [7, 'filly']).length === 6);
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/drop-it.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/drop-it.md
index b2d97fca2f..4dee4301fc 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/drop-it.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/drop-it.md
@@ -1,6 +1,6 @@
---
id: a5deed1811a43193f9f1c841
-title: Drop it
+title: Déjalo caer
challengeType: 5
forumTopicId: 16010
dashedName: drop-it
@@ -8,13 +8,13 @@ dashedName: drop-it
# --description--
-Given the array `arr`, iterate through and remove each element starting from the first element (the 0 index) until the function `func` returns `true` when the iterated element is passed through it.
+Dado el arreglo `arr`, itera y elimina cada elemento comenzando desde el primer elemento (el índice 0) hasta que la función `func` devuelva `true` cuando el elemento iterado se pasa a través de él.
-Then return the rest of the array once the condition is satisfied, otherwise, `arr` should be returned as an empty array.
+Luego devuelve el resto del arreglo una vez que se cumpla la condición, de lo contrario, `arr` debe devolverse como un arreglo vacío.
# --hints--
-`dropElements([1, 2, 3, 4], function(n) {return n >= 3;})` should return `[3, 4]`.
+`dropElements([1, 2, 3, 4], function(n) {return n >= 3;})` debe devolver `[3, 4]`.
```js
assert.deepEqual(
@@ -25,7 +25,7 @@ assert.deepEqual(
);
```
-`dropElements([0, 1, 0, 1], function(n) {return n === 1;})` should return `[1, 0, 1]`.
+`dropElements([0, 1, 0, 1], function(n) {return n === 1;})` debe devolver `[1, 0, 1]`.
```js
assert.deepEqual(
@@ -36,7 +36,7 @@ assert.deepEqual(
);
```
-`dropElements([1, 2, 3], function(n) {return n > 0;})` should return `[1, 2, 3]`.
+`dropElements([1, 2, 3], function(n) {return n > 0;})` debe devolver `[1, 2, 3]`.
```js
assert.deepEqual(
@@ -47,7 +47,7 @@ assert.deepEqual(
);
```
-`dropElements([1, 2, 3, 4], function(n) {return n > 5;})` should return `[]`.
+`dropElements([1, 2, 3, 4], function(n) {return n > 5;})` debe devolver `[]`.
```js
assert.deepEqual(
@@ -58,7 +58,7 @@ assert.deepEqual(
);
```
-`dropElements([1, 2, 3, 7, 4], function(n) {return n > 3;})` should return `[7, 4]`.
+`dropElements([1, 2, 3, 7, 4], function(n) {return n > 3;})` debe devolver `[7, 4]`.
```js
assert.deepEqual(
@@ -69,7 +69,7 @@ assert.deepEqual(
);
```
-`dropElements([1, 2, 3, 9, 2], function(n) {return n > 2;})` should return `[3, 9, 2]`.
+`dropElements([1, 2, 3, 9, 2], function(n) {return n > 2;})` debe devolver `[3, 9, 2]`.
```js
assert.deepEqual(
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/everything-be-true.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/everything-be-true.md
index 7a93f8ae2a..ec34c9f089 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/everything-be-true.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/everything-be-true.md
@@ -1,6 +1,6 @@
---
id: a10d2431ad0c6a099a4b8b52
-title: Everything Be True
+title: Todo sea verdad
challengeType: 5
forumTopicId: 16011
dashedName: everything-be-true
@@ -8,17 +8,17 @@ dashedName: everything-be-true
# --description--
-Check if the predicate (second argument) is truthy on all elements of a collection (first argument).
+Comprueba si el predicado (segundo argumento) es truthy en todos los elementos de una colección (primer argumento).
-In other words, you are given an array collection of objects. The predicate `pre` will be an object property and you need to return `true` if its value is `truthy`. Otherwise, return `false`.
+En otras palabras, se te da una colección de arreglos de objetos. El predicado `pre` será una propiedad del objeto y debe devolver `true` si su valor es `truthy`. De lo contrario, devuelve `false`.
-In JavaScript, `truthy` values are values that translate to `true` when evaluated in a Boolean context.
+En JavaScript, los valores `truthy` son valores que se traducen en `true` cuando se evalúan en un contexto booleano.
-Remember, you can access object properties through either dot notation or `[]` notation.
+Recuerda, puedes acceder a las propiedades del objeto mediante la notación de puntos o la notación de corchetes `[]`.
# --hints--
-`truthCheck([{"user": "Tinky-Winky", "sex": "male"}, {"user": "Dipsy", "sex": "male"}, {"user": "Laa-Laa", "sex": "female"}, {"user": "Po", "sex": "female"}], "sex")` should return true.
+`truthCheck([{"user": "Tinky-Winky", "sex": "male"}, {"user": "Dipsy", "sex": "male"}, {"user": "Laa-Laa", "sex": "female"}, {"user": "Po", "sex": "female"}], "sex")` debe devolver `true`.
```js
assert.strictEqual(
@@ -35,7 +35,7 @@ assert.strictEqual(
);
```
-`truthCheck([{"user": "Tinky-Winky", "sex": "male"}, {"user": "Dipsy"}, {"user": "Laa-Laa", "sex": "female"}, {"user": "Po", "sex": "female"}], "sex")` should return false.
+`truthCheck([{"user": "Tinky-Winky", "sex": "male"}, {"user": "Dipsy"}, {"user": "Laa-Laa", "sex": "female"}, {"user": "Po", "sex": "female"}], "sex")` debe devolver `false`.
```js
assert.strictEqual(
@@ -52,7 +52,7 @@ assert.strictEqual(
);
```
-`truthCheck([{"user": "Tinky-Winky", "sex": "male", "age": 0}, {"user": "Dipsy", "sex": "male", "age": 3}, {"user": "Laa-Laa", "sex": "female", "age": 5}, {"user": "Po", "sex": "female", "age": 4}], "age")` should return false.
+`truthCheck([{"user": "Tinky-Winky", "sex": "male", "age": 0}, {"user": "Dipsy", "sex": "male", "age": 3}, {"user": "Laa-Laa", "sex": "female", "age": 5}, {"user": "Po", "sex": "female", "age": 4}], "age")` debe devolver `false`.
```js
assert.strictEqual(
@@ -69,7 +69,7 @@ assert.strictEqual(
);
```
-`truthCheck([{"name": "Pete", "onBoat": true}, {"name": "Repeat", "onBoat": true}, {"name": "FastForward", "onBoat": null}], "onBoat")` should return false
+`truthCheck([{"name": "Pete", "onBoat": true}, {"name": "Repeat", "onBoat": true}, {"name": "FastForward", "onBoat": null}], "onBoat")` debe devolver `false`.
```js
assert.strictEqual(
@@ -85,7 +85,7 @@ assert.strictEqual(
);
```
-`truthCheck([{"name": "Pete", "onBoat": true}, {"name": "Repeat", "onBoat": true, "alias": "Repete"}, {"name": "FastForward", "onBoat": true}], "onBoat")` should return true
+`truthCheck([{"name": "Pete", "onBoat": true}, {"name": "Repeat", "onBoat": true, "alias": "Repete"}, {"name": "FastForward", "onBoat": true}], "onBoat")` debe devolver `true`.
```js
assert.strictEqual(
@@ -101,13 +101,13 @@ assert.strictEqual(
);
```
-`truthCheck([{"single": "yes"}], "single")` should return true
+`truthCheck([{"single": "yes"}], "single")` debe devolver `true`.
```js
assert.strictEqual(truthCheck([{ single: 'yes' }], 'single'), true);
```
-`truthCheck([{"single": ""}, {"single": "double"}], "single")` should return false
+`truthCheck([{"single": ""}, {"single": "double"}], "single")` debe devolver `false`.
```js
assert.strictEqual(
@@ -116,7 +116,7 @@ assert.strictEqual(
);
```
-`truthCheck([{"single": "double"}, {"single": undefined}], "single")` should return false
+`truthCheck([{"single": "double"}, {"single": undefined}], "single")` debe devolver `false`.
```js
assert.strictEqual(
@@ -125,7 +125,7 @@ assert.strictEqual(
);
```
-`truthCheck([{"single": "double"}, {"single": NaN}], "single")` should return false
+`truthCheck([{"single": "double"}, {"single": NaN}], "single")` debe devolver `false`.
```js
assert.strictEqual(
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/make-a-person.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/make-a-person.md
index b9458749e7..2339a5a8c2 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/make-a-person.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/make-a-person.md
@@ -1,6 +1,6 @@
---
id: a2f1d72d9b908d0bd72bb9f6
-title: Make a Person
+title: Crea una persona
challengeType: 5
forumTopicId: 16020
dashedName: make-a-person
@@ -8,7 +8,7 @@ dashedName: make-a-person
# --description--
-Fill in the object constructor with the following methods below:
+Completa el constructor de objetos con los siguientes métodos:
```js
getFirstName()
@@ -19,53 +19,53 @@ setLastName(last)
setFullName(firstAndLast)
```
-Run the tests to see the expected output for each method. The methods that take an argument must accept only one argument and it has to be a string. These methods must be the only available means of interacting with the object.
+Ejecuta las pruebas para ver el resultado esperado para cada método. Los métodos que toman un argumento deben aceptar sólo un argumento y tiene que ser una cadena. Estos métodos deben ser el único medio disponible para interactuar con el objeto.
# --hints--
-`Object.keys(bob).length` should return 6.
+`Object.keys(bob).length` debe devolver 6.
```js
assert.deepEqual(Object.keys(bob).length, 6);
```
-`bob instanceof Person` should return true.
+`bob instanceof Person` debe devolver `true`.
```js
assert.deepEqual(bob instanceof Person, true);
```
-`bob.firstName` should return undefined.
+`bob.firstName` debe devolver `undefined`.
```js
assert.deepEqual(bob.firstName, undefined);
```
-`bob.lastName` should return undefined.
+`bob.lastName` debe devolver `undefined`.
```js
assert.deepEqual(bob.lastName, undefined);
```
-`bob.getFirstName()` should return "Bob".
+`bob.getFirstName()` debe devolver la cadena `Bob`.
```js
assert.deepEqual(bob.getFirstName(), 'Bob');
```
-`bob.getLastName()` should return "Ross".
+`bob.getLastName()` debe devolver la cadena `Ross`.
```js
assert.deepEqual(bob.getLastName(), 'Ross');
```
-`bob.getFullName()` should return "Bob Ross".
+`bob.getFullName()` debe devolver la cadena `Bob Ross`.
```js
assert.deepEqual(bob.getFullName(), 'Bob Ross');
```
-`bob.getFullName()` should return "Haskell Ross" after `bob.setFirstName("Haskell")`.
+`bob.getFullName()` debe devolver la cadena `Haskell Ross` after `bob.setFirstName("Haskell")`.
```js
assert.strictEqual(
@@ -77,7 +77,7 @@ assert.strictEqual(
);
```
-`bob.getFullName()` should return "Haskell Curry" after `bob.setLastName("Curry")`.
+`bob.getFullName()` debe devolver la cadena `Haskell Curry` después de `bob.setLastName("Curry")`.
```js
assert.strictEqual(
@@ -90,7 +90,7 @@ assert.strictEqual(
);
```
-`bob.getFullName()` should return "Haskell Curry" after `bob.setFullName("Haskell Curry")`.
+`bob.getFullName()` debe devolver la cadena `Haskell Curry` después de `bob.setFullName("Haskell Curry")`.
```js
assert.strictEqual(
@@ -102,7 +102,7 @@ assert.strictEqual(
);
```
-`bob.getFirstName()` should return "Haskell" after `bob.setFullName("Haskell Curry")`.
+`bob.getFirstName()` debe devolver la cadena `Haskell` después de `bob.setFullName("Haskell Curry")`.
```js
assert.strictEqual(
@@ -114,7 +114,7 @@ assert.strictEqual(
);
```
-`bob.getLastName()` should return "Curry" after `bob.setFullName("Haskell Curry")`.
+`bob.getLastName()` debe devolver la cadena `Curry` después de `bob.setFullName("Haskell Curry")`.
```js
assert.strictEqual(
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/missing-letters.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/missing-letters.md
index c5e807a7a4..409794ecc3 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/missing-letters.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/missing-letters.md
@@ -1,6 +1,6 @@
---
id: af7588ade1100bde429baf20
-title: Missing letters
+title: Letras faltantes
challengeType: 5
forumTopicId: 16023
dashedName: missing-letters
@@ -8,37 +8,37 @@ dashedName: missing-letters
# --description--
-Find the missing letter in the passed letter range and return it.
+Encuentra la letra que falta en la siguiente cadena de letras y devuélvela.
-If all letters are present in the range, return undefined.
+Si todas las letras están presentes en la cadena, devuelve `undefined`.
# --hints--
-`fearNotLetter("abce")` should return "d".
+`fearNotLetter("abce")` debe devolver la cadena `d`.
```js
assert.deepEqual(fearNotLetter('abce'), 'd');
```
-`fearNotLetter("abcdefghjklmno")` should return "i".
+`fearNotLetter("abcdefghjklmno")` debe devolver la cadena `i`.
```js
assert.deepEqual(fearNotLetter('abcdefghjklmno'), 'i');
```
-`fearNotLetter("stvwx")` should return "u".
+`fearNotLetter("stvwx")` debe devolver la cadena `u`.
```js
assert.deepEqual(fearNotLetter('stvwx'), 'u');
```
-`fearNotLetter("bcdf")` should return "e".
+`fearNotLetter("bcdf")` debe devolver la cadena `e`.
```js
assert.deepEqual(fearNotLetter('bcdf'), 'e');
```
-`fearNotLetter("abcdefghijklmnopqrstuvwxyz")` should return undefined.
+`fearNotLetter("abcdefghijklmnopqrstuvwxyz")` debe devolver `undefined`.
```js
assert.isUndefined(fearNotLetter('abcdefghijklmnopqrstuvwxyz'));
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/pig-latin.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/pig-latin.md
index af40b695bf..3e40e2e5d9 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/pig-latin.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/pig-latin.md
@@ -1,6 +1,6 @@
---
id: aa7697ea2477d1316795783b
-title: Pig Latin
+title: Pig Latin (Latin de los cerdos)
challengeType: 5
forumTopicId: 16039
dashedName: pig-latin
@@ -8,55 +8,55 @@ dashedName: pig-latin
# --description--
-Pig Latin is a way of altering English Words. The rules are as follows:
+Pig Latin (latin de los cerdos) es una manera de alterar las palabras en inglés. Las normas son las siguientes:
-\- If a word begins with a consonant, take the first consonant or consonant cluster, move it to the end of the word, and add "ay" to it.
+\- Si una palabra comienza con una consonante, toma la primer consonante o grupo de consonantes, muévela al final de la palabra, y añade `ay` a ella.
-\- If a word begins with a vowel, just add "way" at the end.
+\- Si una palabra comienza con una vocal, solo añade `way` al final.
# --instructions--
-Translate the provided string to Pig Latin. Input strings are guaranteed to be English words in all lowercase.
+Traduce la cadena proporcionada a Pig Latin. Las cadenas de entrada están garantizadas como palabras en inglés en minúsculas.
# --hints--
-`translatePigLatin("california")` should return "aliforniacay".
+`translatePigLatin("california")` debe devolver la cadena `aliforniacay`.
```js
assert.deepEqual(translatePigLatin('california'), 'aliforniacay');
```
-`translatePigLatin("paragraphs")` should return "aragraphspay".
+`translatePigLatin("paragraphs")` debe devolver la cadena `aragraphspay`.
```js
assert.deepEqual(translatePigLatin('paragraphs'), 'aragraphspay');
```
-`translatePigLatin("glove")` should return "oveglay".
+`translatePigLatin("glove")` debe devolver la cadena `oveglay`.
```js
assert.deepEqual(translatePigLatin('glove'), 'oveglay');
```
-`translatePigLatin("algorithm")` should return "algorithmway".
+`translatePigLatin("algorithm")` debe devolver la cadena `algorithmway`.
```js
assert.deepEqual(translatePigLatin('algorithm'), 'algorithmway');
```
-`translatePigLatin("eight")` should return "eightway".
+`translatePigLatin("eight")` debe devolver la cadena `eightway`.
```js
assert.deepEqual(translatePigLatin('eight'), 'eightway');
```
-Should handle words where the first vowel comes in the middle of the word. `translatePigLatin("schwartz")` should return "artzschway".
+Debes manejar las palabras en donde la primera vocal viene en el centro de la palabra. `translatePigLatin("schwartz")` debe devolver la cadena `artzschway`.
```js
assert.deepEqual(translatePigLatin('schwartz'), 'artzschway');
```
-Should handle words without vowels. `translatePigLatin("rhythm")` should return "rhythmay".
+Debes manejar las palabras sin vocales. `translatePigLatin("rhythm")` debe devolver la cadena `rhythmay`.
```js
assert.deepEqual(translatePigLatin('rhythm'), 'rhythmay');
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/search-and-replace.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/search-and-replace.md
index f4ca7362bd..6ce654375d 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/search-and-replace.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/search-and-replace.md
@@ -1,6 +1,6 @@
---
id: a0b5010f579e69b815e7c5d6
-title: Search and Replace
+title: Busca y reemplaza
challengeType: 5
forumTopicId: 16045
dashedName: search-and-replace
@@ -8,20 +8,19 @@ dashedName: search-and-replace
# --description--
-Perform a search and replace on the sentence using the arguments provided and return the new sentence.
+Realiza una búsqueda y reemplaza en la oración usando los argumentos proporcionados y devuelve la nueva oración.
-First argument is the sentence to perform the search and replace on.
+El primer argumento es la frase sobre la que se va a realizar la búsqueda y el reemplazo.
-Second argument is the word that you will be replacing (before).
+El segundo argumento es la palabra que se reemplazará (antes).
-Third argument is what you will be replacing the second argument with (after).
+El tercer argumento es lo que reemplazará el segundo argumento (después).
-**Note**
-Preserve the case of the first character in the original word when you are replacing it. For example if you mean to replace the word "Book" with the word "dog", it should be replaced as "Dog"
+**Note:** Mantén la capitalización del primer carácter en la palabra original cuando lo estés reemplazando. Por ejemplo, si quieres reemplazar la palabra `Book` por la palabra `dog`, debe ser reemplazada como `Dog`
# --hints--
-`myReplace("Let us go to the store", "store", "mall")` should return "Let us go to the mall".
+`myReplace("Let us go to the store", "store", "mall")` debe devolver la cadena `Let us go to the mall`.
```js
assert.deepEqual(
@@ -30,7 +29,7 @@ assert.deepEqual(
);
```
-`myReplace("He is Sleeping on the couch", "Sleeping", "sitting")` should return "He is Sitting on the couch".
+`myReplace("He is Sleeping on the couch", "Sleeping", "sitting")` debe devolver la cadena `He is Sitting on the couch`.
```js
assert.deepEqual(
@@ -39,7 +38,7 @@ assert.deepEqual(
);
```
-`myReplace("I think we should look up there", "up", "Down")` should return "I think we should look down there".
+`myReplace("I think we should look up there", "up", "Down")` debe devolver la cadena `I think we should look down there`.
```js
assert.deepEqual(
@@ -48,7 +47,7 @@ assert.deepEqual(
);
```
-`myReplace("This has a spellngi error", "spellngi", "spelling")` should return "This has a spelling error".
+`myReplace("This has a spellngi error", "spellngi", "spelling")` debe devolver la cadena `This has a spelling error`.
```js
assert.deepEqual(
@@ -57,7 +56,7 @@ assert.deepEqual(
);
```
-`myReplace("His name is Tom", "Tom", "john")` should return "His name is John".
+`myReplace("His name is Tom", "Tom", "john")` debe devolver la cadena `His name is John`.
```js
assert.deepEqual(
@@ -66,7 +65,7 @@ assert.deepEqual(
);
```
-`myReplace("Let us get back to more Coding", "Coding", "algorithms")` should return "Let us get back to more Algorithms".
+`myReplace("Let us get back to more Coding", "Coding", "algorithms")` debe devolver la cadena `Let us get back to more Algorithms`.
```js
assert.deepEqual(
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/seek-and-destroy.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/seek-and-destroy.md
index 5fbf7d5aa8..6d74633fd6 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/seek-and-destroy.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/seek-and-destroy.md
@@ -1,6 +1,6 @@
---
id: a39963a4c10bc8b4d4f06d7e
-title: Seek and Destroy
+title: Busca y destruye
challengeType: 5
forumTopicId: 16046
dashedName: seek-and-destroy
@@ -8,38 +8,37 @@ dashedName: seek-and-destroy
# --description--
-You will be provided with an initial array (the first argument in the destroyer function), followed by one or more arguments. Remove all elements from the initial array that are of the same value as these arguments.
+Se proporcionará un arreglo inicial (el primer argumento en la función `destroyer`), seguido de uno o más argumentos. Elimina todos los elementos del arreglo inicial que tengan el mismo valor que estos argumentos.
-**Note**
-You have to use the `arguments` object.
+**Nota:** Tienes que utilizar el objeto `arguments`.
# --hints--
-`destroyer([1, 2, 3, 1, 2, 3], 2, 3)` should return `[1, 1]`.
+`destroyer([1, 2, 3, 1, 2, 3], 2, 3)` debe devolver `[1, 1]`.
```js
assert.deepEqual(destroyer([1, 2, 3, 1, 2, 3], 2, 3), [1, 1]);
```
-`destroyer([1, 2, 3, 5, 1, 2, 3], 2, 3)` should return `[1, 5, 1]`.
+`destroyer([1, 2, 3, 5, 1, 2, 3], 2, 3)` debe devolver `[1, 5, 1]`.
```js
assert.deepEqual(destroyer([1, 2, 3, 5, 1, 2, 3], 2, 3), [1, 5, 1]);
```
-`destroyer([3, 5, 1, 2, 2], 2, 3, 5)` should return `[1]`.
+`destroyer([3, 5, 1, 2, 2], 2, 3, 5)` debe devolver `[1]`.
```js
assert.deepEqual(destroyer([3, 5, 1, 2, 2], 2, 3, 5), [1]);
```
-`destroyer([2, 3, 2, 3], 2, 3)` should return `[]`.
+`destroyer([2, 3, 2, 3], 2, 3)` debe devolver `[]`.
```js
assert.deepEqual(destroyer([2, 3, 2, 3], 2, 3), []);
```
-`destroyer(["tree", "hamburger", 53], "tree", 53)` should return `["hamburger"]`.
+`destroyer(["tree", "hamburger", 53], "tree", 53)` debe devolver `["hamburger"]`.
```js
assert.deepEqual(destroyer(['tree', 'hamburger', 53], 'tree', 53), [
@@ -47,7 +46,7 @@ assert.deepEqual(destroyer(['tree', 'hamburger', 53], 'tree', 53), [
]);
```
-`destroyer(["possum", "trollo", 12, "safari", "hotdog", 92, 65, "grandma", "bugati", "trojan", "yacht"], "yacht", "possum", "trollo", "safari", "hotdog", "grandma", "bugati", "trojan")` should return `[12,92,65]`.
+`destroyer(["possum", "trollo", 12, "safari", "hotdog", 92, 65, "grandma", "bugati", "trojan", "yacht"], "yacht", "possum", "trollo", "safari", "hotdog", "grandma", "bugati", "trojan")` debe devolver `[12,92,65]`.
```js
assert.deepEqual(
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/smallest-common-multiple.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/smallest-common-multiple.md
index e6c39f5ee6..f408686531 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/smallest-common-multiple.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/smallest-common-multiple.md
@@ -1,6 +1,6 @@
---
id: ae9defd7acaf69703ab432ea
-title: Smallest Common Multiple
+title: Múltiplo común más pequeño
challengeType: 5
forumTopicId: 16075
dashedName: smallest-common-multiple
@@ -8,45 +8,45 @@ dashedName: smallest-common-multiple
# --description--
-Find the smallest common multiple of the provided parameters that can be evenly divided by both, as well as by all sequential numbers in the range between these parameters.
+Encuentra el múltiplo común más pequeño de los parámetros proporcionados que pueden dividirse equitativamente por ambos, así como por todos los números consecutivos del rango entre estos parámetros.
-The range will be an array of two numbers that will not necessarily be in numerical order.
+El rango será un arreglo de dos números que no necesariamente estarán en orden numérico.
-For example, if given 1 and 3, find the smallest common multiple of both 1 and 3 that is also evenly divisible by all numbers *between* 1 and 3. The answer here would be 6.
+Por ejemplo, si se dan 1 y 3, encuentra el múltiplo común más pequeño de 1 y 3 que también es dividido por todos los números *entre* 1 y 3. La respuesta sería 6.
# --hints--
-`smallestCommons([1, 5])` should return a number.
+`smallestCommons([1, 5])` debe devolver un número.
```js
assert.deepEqual(typeof smallestCommons([1, 5]), 'number');
```
-`smallestCommons([1, 5])` should return 60.
+`smallestCommons([1, 5])` debe devolver 60.
```js
assert.deepEqual(smallestCommons([1, 5]), 60);
```
-`smallestCommons([5, 1])` should return 60.
+`smallestCommons([5, 1])` debe devolver 60.
```js
assert.deepEqual(smallestCommons([5, 1]), 60);
```
-`smallestCommons([2, 10])` should return 2520.
+`smallestCommons([2, 10])` debe devolver 2520.
```js
assert.deepEqual(smallestCommons([2, 10]), 2520);
```
-`smallestCommons([1, 13])` should return 360360.
+`smallestCommons([1, 13])` debe devolver 360360.
```js
assert.deepEqual(smallestCommons([1, 13]), 360360);
```
-`smallestCommons([23, 18])` should return 6056820.
+`smallestCommons([23, 18])` debe devolver 6056820.
```js
assert.deepEqual(smallestCommons([23, 18]), 6056820);
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sorted-union.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sorted-union.md
index cbc9cd794a..bdfa5962e9 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sorted-union.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sorted-union.md
@@ -1,6 +1,6 @@
---
id: a105e963526e7de52b219be9
-title: Sorted Union
+title: Unión ordenada
challengeType: 5
forumTopicId: 16077
dashedName: sorted-union
@@ -8,29 +8,29 @@ dashedName: sorted-union
# --description--
-Write a function that takes two or more arrays and returns a new array of unique values in the order of the original provided arrays.
+Escribe una función que tome dos o más arreglos y devuelve un nuevo arreglo de valores únicos manteniendo el orden original de los arreglos proporcionados.
-In other words, all values present from all arrays should be included in their original order, but with no duplicates in the final array.
+En otras palabras, todos los valores presentes de todos los arreglos deben incluirse en su orden original, pero sin duplicados en el arreglo final.
-The unique numbers should be sorted by their original order, but the final array should not be sorted in numerical order.
+Los números únicos deben ser ordenados según su orden original, pero el arreglo final no debe ordenarse según el orden numérico.
-Check the assertion tests for examples.
+Revisa las pruebas de afirmación para ver ejemplos.
# --hints--
-`uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1])` should return `[1, 3, 2, 5, 4]`.
+`uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1])` debe devolver `[1, 3, 2, 5, 4]`.
```js
assert.deepEqual(uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1]), [1, 3, 2, 5, 4]);
```
-`uniteUnique([1, 2, 3], [5, 2, 1])` should return `[1, 2, 3, 5]`.
+`uniteUnique([1, 2, 3], [5, 2, 1])` debe devolver `[1, 2, 3, 5]`.
```js
assert.deepEqual(uniteUnique([1, 2, 3], [5, 2, 1]), [1, 2, 3, 5]);
```
-`uniteUnique([1, 2, 3], [5, 2, 1, 4], [2, 1], [6, 7, 8])` should return `[1, 2, 3, 5, 4, 6, 7, 8]`.
+`uniteUnique([1, 2, 3], [5, 2, 1, 4], [2, 1], [6, 7, 8])` debe devolver `[1, 2, 3, 5, 4, 6, 7, 8]`.
```js
assert.deepEqual(uniteUnique([1, 2, 3], [5, 2, 1, 4], [2, 1], [6, 7, 8]), [
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/spinal-tap-case.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/spinal-tap-case.md
index c68938ce89..f1ee3a0b98 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/spinal-tap-case.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/spinal-tap-case.md
@@ -1,6 +1,6 @@
---
id: a103376db3ba46b2d50db289
-title: Spinal Tap Case
+title: Spinal case
challengeType: 5
forumTopicId: 16078
dashedName: spinal-tap-case
@@ -8,23 +8,23 @@ dashedName: spinal-tap-case
# --description--
-Convert a string to spinal case. Spinal case is all-lowercase-words-joined-by-dashes.
+Convierte una cadena a spinal case. Spinal case significa todas-las-palabras-en-minúscula-unidas-por-guiones.
# --hints--
-`spinalCase("This Is Spinal Tap")` should return `"this-is-spinal-tap"`.
+`spinalCase("This Is Spinal Tap")` debe devolver la cadena `this-is-spinal-tap`.
```js
assert.deepEqual(spinalCase('This Is Spinal Tap'), 'this-is-spinal-tap');
```
-`spinalCase("thisIsSpinalTap")` should return `"this-is-spinal-tap"`.
+`spinalCase("thisIsSpinalTap")` debe devolver la cadena `this-is-spinal-tap`.
```js
assert.strictEqual(spinalCase('thisIsSpinalTap'), 'this-is-spinal-tap');
```
-`spinalCase("The_Andy_Griffith_Show")` should return `"the-andy-griffith-show"`.
+`spinalCase("The_Andy_Griffith_Show")` debe devolver la cadena `the-andy-griffith-show`.
```js
assert.strictEqual(
@@ -33,7 +33,7 @@ assert.strictEqual(
);
```
-`spinalCase("Teletubbies say Eh-oh")` should return `"teletubbies-say-eh-oh"`.
+`spinalCase("Teletubbies say Eh-oh")` debe devolver la cadena `teletubbies-say-eh-oh`.
```js
assert.strictEqual(
@@ -42,7 +42,7 @@ assert.strictEqual(
);
```
-`spinalCase("AllThe-small Things")` should return `"all-the-small-things"`.
+`spinalCase("AllThe-small Things")` debe devolver la cadena `all-the-small-things`.
```js
assert.strictEqual(spinalCase('AllThe-small Things'), 'all-the-small-things');
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/steamroller.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/steamroller.md
index 5744ab7e20..feb13f0535 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/steamroller.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/steamroller.md
@@ -1,6 +1,6 @@
---
id: ab306dbdcc907c7ddfc30830
-title: Steamroller
+title: Aplanadora
challengeType: 5
forumTopicId: 16079
dashedName: steamroller
@@ -8,35 +8,35 @@ dashedName: steamroller
# --description--
-Flatten a nested array. You must account for varying levels of nesting.
+Aplana un arreglo anidado. Debes tener en cuenta los diferentes niveles de anidación.
# --hints--
-`steamrollArray([[["a"]], [["b"]]])` should return `["a", "b"]`.
+`steamrollArray([[["a"]], [["b"]]])` debe devolver `["a", "b"]`.
```js
assert.deepEqual(steamrollArray([[['a']], [['b']]]), ['a', 'b']);
```
-`steamrollArray([1, [2], [3, [[4]]]])` should return `[1, 2, 3, 4]`.
+`steamrollArray([1, [2], [3, [[4]]]])` debe devolver `[1, 2, 3, 4]`.
```js
assert.deepEqual(steamrollArray([1, [2], [3, [[4]]]]), [1, 2, 3, 4]);
```
-`steamrollArray([1, [], [3, [[4]]]])` should return `[1, 3, 4]`.
+`steamrollArray([1, [], [3, [[4]]]])` debe devolver `[1, 3, 4]`.
```js
assert.deepEqual(steamrollArray([1, [], [3, [[4]]]]), [1, 3, 4]);
```
-`steamrollArray([1, {}, [3, [[4]]]])` should return `[1, {}, 3, 4]`.
+`steamrollArray([1, {}, [3, [[4]]]])` debe devolver `[1, {}, 3, 4]`.
```js
assert.deepEqual(steamrollArray([1, {}, [3, [[4]]]]), [1, {}, 3, 4]);
```
-Your solution should not use the `Array.prototype.flat()` or `Array.prototype.flatMap()` methods.
+Tu solución no debe utilizar los métodos `Array.prototype.flat()` o `Array.prototype.flatMap()`.
```js
assert(!code.match(/\.\s*flat\s*\(/) && !code.match(/\.\s*flatMap\s*\(/));
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-numbers-in-a-range.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-numbers-in-a-range.md
index a7dbdaeecc..4a83a8f759 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-numbers-in-a-range.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-numbers-in-a-range.md
@@ -1,6 +1,6 @@
---
id: a3566b1109230028080c9345
-title: Sum All Numbers in a Range
+title: Suma todos los números en un rango
challengeType: 5
forumTopicId: 16083
dashedName: sum-all-numbers-in-a-range
@@ -8,37 +8,37 @@ dashedName: sum-all-numbers-in-a-range
# --description--
-We'll pass you an array of two numbers. Return the sum of those two numbers plus the sum of all the numbers between them. The lowest number will not always come first.
+Te pasaremos un arreglo de dos números. Devuelve la suma de estos dos números más la suma de todos los números entre ellos. El número más bajo no siempre será el primero.
-For example, `sumAll([4,1])` should return `10` because sum of all the numbers between 1 and 4 (both inclusive) is `10`.
+Por ejemplo, `sumAll([4,1])`> debe devolver `10` porque la suma de todos los números entre 1 y 4 (ambos incluidos) es `10`.
# --hints--
-`sumAll([1, 4])` should return a number.
+`sumAll([1, 4])` debe devolver un número.
```js
assert(typeof sumAll([1, 4]) === 'number');
```
-`sumAll([1, 4])` should return 10.
+`sumAll([1, 4])` debe devolver 10.
```js
assert.deepEqual(sumAll([1, 4]), 10);
```
-`sumAll([4, 1])` should return 10.
+`sumAll([4, 1])` debe devolver 10.
```js
assert.deepEqual(sumAll([4, 1]), 10);
```
-`sumAll([5, 10])` should return 45.
+`sumAll([5, 10])` debe devolver 45.
```js
assert.deepEqual(sumAll([5, 10]), 45);
```
-`sumAll([10, 5])` should return 45.
+`sumAll([10, 5])` debería devolver 45.
```js
assert.deepEqual(sumAll([10, 5]), 45);
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-odd-fibonacci-numbers.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-odd-fibonacci-numbers.md
index 0c5b625e71..844c7da71f 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-odd-fibonacci-numbers.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-odd-fibonacci-numbers.md
@@ -1,6 +1,6 @@
---
id: a5229172f011153519423690
-title: Sum All Odd Fibonacci Numbers
+title: Suma todos los números impares de Fibonacci
challengeType: 5
forumTopicId: 16084
dashedName: sum-all-odd-fibonacci-numbers
@@ -8,45 +8,45 @@ dashedName: sum-all-odd-fibonacci-numbers
# --description--
-Given a positive integer `num`, return the sum of all odd Fibonacci numbers that are less than or equal to `num`.
+Dado un entero positivo `num`, devuelve la suma de todos los números impares de Fibonacci que son menores o iguales a `num`.
-The first two numbers in the Fibonacci sequence are 1 and 1. Every additional number in the sequence is the sum of the two previous numbers. The first six numbers of the Fibonacci sequence are 1, 1, 2, 3, 5 and 8.
+Los dos primeros números en la secuencia de Fibonacci son 1 y 1. Cada número adicional en la secuencia es la suma de los dos números anteriores. Los seis primeros números de la secuencia de Fibonacci son 1, 1, 2, 3, 5 y 8.
-For example, `sumFibs(10)` should return `10` because all odd Fibonacci numbers less than or equal to `10` are 1, 1, 3, and 5.
+Por ejemplo, `sumFibs(10)` debe devolver `10` porque todos los números impares de Fibonacci menores o iguales a `10` son 1, 1, 3 y 5.
# --hints--
-`sumFibs(1)` should return a number.
+`sumFibs(1)` debe devolver un número.
```js
assert(typeof sumFibs(1) === 'number');
```
-`sumFibs(1000)` should return 1785.
+`sumFibs(1000)` debe devolver 1785.
```js
assert(sumFibs(1000) === 1785);
```
-`sumFibs(4000000)` should return 4613732.
+`sumFibs(4000000)` debe devolver 4613732.
```js
assert(sumFibs(4000000) === 4613732);
```
-`sumFibs(4)` should return 5.
+`sumFibs(4)` debe devolver 5.
```js
assert(sumFibs(4) === 5);
```
-`sumFibs(75024)` should return 60696.
+`sumFibs(75024)` debe devolver 60696.
```js
assert(sumFibs(75024) === 60696);
```
-`sumFibs(75025)` should return 135721.
+`sumFibs(75025)` debe devolver 135721.
```js
assert(sumFibs(75025) === 135721);
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-primes.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-primes.md
index 57295dd11e..84581e0cb9 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-primes.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-primes.md
@@ -1,6 +1,6 @@
---
id: a3bfc1673c0526e06d3ac698
-title: Sum All Primes
+title: Suma todos los números primos
challengeType: 5
forumTopicId: 16085
dashedName: sum-all-primes
@@ -8,25 +8,25 @@ dashedName: sum-all-primes
# --description--
-A prime number is a whole number greater than 1 with exactly two divisors: 1 and itself. For example, 2 is a prime number because it is only divisible by 1 and 2. In contrast, 4 is not prime since it is divisible by 1, 2 and 4.
+Un número primo es un número entero mayor que 1 con sólo dos divisores: 1 y el propio número. Por ejemplo, 2 es un número primo porque sólo es divisible entre 1 y 2. Por el contrario, 4 no es primo ya que es divisible entre 1, 2 y 4.
-Rewrite `sumPrimes` so it returns the sum of all prime numbers that are less than or equal to num.
+Reescribe `sumPrimes` para que devuelva la suma de todos los números primos que sean menores o iguales a num.
# --hints--
-`sumPrimes(10)` should return a number.
+`sumPrimes(10)` debe devolver un número.
```js
assert.deepEqual(typeof sumPrimes(10), 'number');
```
-`sumPrimes(10)` should return 17.
+`sumPrimes(10)` debe devolver 17.
```js
assert.deepEqual(sumPrimes(10), 17);
```
-`sumPrimes(977)` should return 73156.
+`sumPrimes(977)` debe devolver 73156.
```js
assert.deepEqual(sumPrimes(977), 73156);