diff --git a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/regular-expressions/match-all-letters-and-numbers.md b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/regular-expressions/match-all-letters-and-numbers.md index 752a09b402..4ae2fd5671 100644 --- a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/regular-expressions/match-all-letters-and-numbers.md +++ b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/regular-expressions/match-all-letters-and-numbers.md @@ -45,7 +45,7 @@ assert(alphabetRegexV2.global); assert(/\\w/.test(alphabetRegexV2.source)); ``` -你的正則表達式應該在 `The five boxing wizards jump quickly.` 中匹配到 31 個非字母數字字符。 +你的正則表達式應該在 `The five boxing wizards jump quickly.` 中匹配到 31 個字母數字字符。 ```js assert( @@ -53,7 +53,7 @@ assert( ); ``` -你的正則表達式應該在 `Pack my box with five dozen liquor jugs.` 中匹配到 32 個非字母數字字符。 +你的正則表達式應該在 `Pack my box with five dozen liquor jugs.` 中匹配到 32 個字母數字字符。 ```js assert( @@ -62,7 +62,7 @@ assert( ); ``` -你的正則表達式應該在 `How vexingly quick daft zebras jump!` 中匹配到 30 個非字母數字字符。 +你的正則表達式應該在 `How vexingly quick daft zebras jump!` 中匹配到 30 個字母數字字符。 ```js assert( diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/rosetta-code/100-doors.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/rosetta-code/100-doors.md index 16fda3fa65..6b3d17ce88 100644 --- a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/rosetta-code/100-doors.md +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/rosetta-code/100-doors.md @@ -8,27 +8,27 @@ dashedName: 100-doors # --description-- -連續 100 個門都是最初關閉的。 You make 100 passes by the doors. The first time through, visit every door and 'toggle' the door (if the door is closed, open it; if it is open, close it). The second time, only visit every 2nd door (i.e., door #2, #4, #6, ...) and toggle it. The third time, visit every 3rd door (i.e., door #3, #6, #9, ...), etc., until you only visit the 100th door. +連續 100 個門都是最初關閉的。 你在門前通行了 100 次。 第一次通行時,訪問每扇門,並“切換”門(如果門是關閉的,就打開它;如果門是打開的,就關閉它)。 第二次,只訪問每個第二扇門(即門 #2,#4,#6,...)並切換它們。 第三次,每三個門訪問一次(即門 #3,#6,#9,...)等,直到你只訪問第 100 個門。 # --instructions-- -Implement a function to determine the state of the doors after the last pass. Return the final result in an array, with only the door number included in the array if it is open. +實現一個函數,以確定最後一次通過後門的狀態。 以數組形式返回最終結果,數組中只包含打開的門的門號。 # --hints-- -`getFinalOpenedDoors` should be a function. +`getFinalOpenedDoors` 應該是一個函數。 ```js assert(typeof getFinalOpenedDoors === 'function'); ``` -`getFinalOpenedDoors` should return an array. +`getFinalOpenedDoors` 應該返回一個數組。 ```js assert(Array.isArray(getFinalOpenedDoors(100))); ``` -`getFinalOpenedDoors` should produce the correct result. +`getFinalOpenedDoors` 應該產生正確的結果。 ```js assert.deepEqual(getFinalOpenedDoors(100), solution); diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/rosetta-code/24-game.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/rosetta-code/24-game.md index 7bf28fe4df..775034b49c 100644 --- a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/rosetta-code/24-game.md +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/rosetta-code/24-game.md @@ -1,6 +1,6 @@ --- id: 5951e88f64ebf159166a1176 -title: 24 game +title: 24 點遊戲 challengeType: 5 forumTopicId: 302218 dashedName: 24-game @@ -8,23 +8,23 @@ dashedName: 24-game # --description-- -The [24 Game](https://en.wikipedia.org/wiki/24_Game) tests a person's mental arithmetic. +[24 點遊戲](https://en.wikipedia.org/wiki/24_Game)測試一個人的心算能力。 -The aim of the game is to arrange four numbers in a way that when evaluated, the result is 24 +遊戲的目標是使四個數字的計算結果是 24。 # --instructions-- -Implement a function that takes a string of four digits as its argument, with each digit from 1 to 9 (inclusive) with repetitions allowed, and returns an arithmetic expression that evaluates to the number 24. If no such solution exists, return "no solution exists". +實現一個函數,該函數將一個四位數的字符串作爲其參數,每個數字從 1 到 9(含)並允許重複,並返回一個計算結果爲數字 24 的算術表達式。 如果不存在這樣的解,則返回“沒有解決方案”。 -**Rules:** +**規則:**
solve24("4878");
| (7-8/8)\*4
|
| solve24("1234");
| 3\*1\*4\*2
|
@@ -33,31 +33,31 @@ Implement a function that takes a string of four digits as its argument, with ea
# --hints--
-`solve24` should be a function.
+`solve24` 應該是一個函數。
```js
assert(typeof solve24 === 'function');
```
-`solve24("4878")` should return `(7-8/8)*4` or `4*(7-8/8)`
+`solve24("4878")` 應該返回 `(7-8/8)*4` 或 `4*(7-8/8)`。
```js
assert(include(answers[0], removeParentheses(solve24(testCases[0]))));
```
-`solve24("1234")` should return any arrangement of `1*2*3*4`
+`solve24("1234")` 應該返回 `1*2*3*4`。
```js
assert(include(answers[1], removeParentheses(solve24(testCases[1]))));
```
-`solve24("6789")` should return `(6*8)/(9-7)` or `(8*6)/(9-7)`
+`solve24("6789")` 應該返回 `(6*8)/(9-7)` 或 `(8*6)/(9-7)`。
```js
assert(include(answers[2], removeParentheses(solve24(testCases[2]))));
```
-`solve24("1127")` should return a permutation of `(1+7)*(1+2)`
+`solve24("1127")` 應該返回 `(1+7)*(1+2)`。
```js
assert(include(answers[3], removeParentheses(solve24(testCases[3]))));
diff --git a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/regular-expressions/match-all-letters-and-numbers.md b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/regular-expressions/match-all-letters-and-numbers.md
index 8a18627513..f76074a7bf 100644
--- a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/regular-expressions/match-all-letters-and-numbers.md
+++ b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/regular-expressions/match-all-letters-and-numbers.md
@@ -45,7 +45,7 @@ assert(alphabetRegexV2.global);
assert(/\\w/.test(alphabetRegexV2.source));
```
-你的正则表达式应该在 `The five boxing wizards jump quickly.` 中匹配到 31 个非字母数字字符。
+你的正则表达式应该在 `The five boxing wizards jump quickly.` 中匹配到 31 个字母数字字符。
```js
assert(
@@ -53,7 +53,7 @@ assert(
);
```
-你的正则表达式应该在 `Pack my box with five dozen liquor jugs.` 中匹配到 32 个非字母数字字符。
+你的正则表达式应该在 `Pack my box with five dozen liquor jugs.` 中匹配到 32 个字母数字字符。
```js
assert(
@@ -62,7 +62,7 @@ assert(
);
```
-你的正则表达式应该在 `How vexingly quick daft zebras jump!` 中匹配到 30 个非字母数字字符。
+你的正则表达式应该在 `How vexingly quick daft zebras jump!` 中匹配到 30 个字母数字字符。
```js
assert(
diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/rosetta-code/100-doors.md b/curriculum/challenges/chinese/10-coding-interview-prep/rosetta-code/100-doors.md
index 07d4eb3647..c27b17f0b5 100644
--- a/curriculum/challenges/chinese/10-coding-interview-prep/rosetta-code/100-doors.md
+++ b/curriculum/challenges/chinese/10-coding-interview-prep/rosetta-code/100-doors.md
@@ -8,27 +8,27 @@ dashedName: 100-doors
# --description--
-连续 100 个门都是最初关闭的。 You make 100 passes by the doors. The first time through, visit every door and 'toggle' the door (if the door is closed, open it; if it is open, close it). The second time, only visit every 2nd door (i.e., door #2, #4, #6, ...) and toggle it. The third time, visit every 3rd door (i.e., door #3, #6, #9, ...), etc., until you only visit the 100th door.
+连续 100 个门都是最初关闭的。 你在门前通行了 100 次。 第一次通行时,访问每扇门,并“切换”门(如果门是关闭的,就打开它;如果门是打开的,就关闭它)。 第二次,只访问每个第二扇门(即门 #2,#4,#6,...)并切换它们。 第三次,每三个门访问一次(即门 #3,#6,#9,...)等,直到你只访问第 100 个门。
# --instructions--
-Implement a function to determine the state of the doors after the last pass. Return the final result in an array, with only the door number included in the array if it is open.
+实现一个函数,以确定最后一次通过后门的状态。 以数组形式返回最终结果,数组中只包含打开的门的门号。
# --hints--
-`getFinalOpenedDoors` should be a function.
+`getFinalOpenedDoors` 应该是一个函数。
```js
assert(typeof getFinalOpenedDoors === 'function');
```
-`getFinalOpenedDoors` should return an array.
+`getFinalOpenedDoors` 应该返回一个数组。
```js
assert(Array.isArray(getFinalOpenedDoors(100)));
```
-`getFinalOpenedDoors` should produce the correct result.
+`getFinalOpenedDoors` 应该产生正确的结果。
```js
assert.deepEqual(getFinalOpenedDoors(100), solution);
diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/rosetta-code/24-game.md b/curriculum/challenges/chinese/10-coding-interview-prep/rosetta-code/24-game.md
index 7bf28fe4df..f5a4c1da24 100644
--- a/curriculum/challenges/chinese/10-coding-interview-prep/rosetta-code/24-game.md
+++ b/curriculum/challenges/chinese/10-coding-interview-prep/rosetta-code/24-game.md
@@ -1,6 +1,6 @@
---
id: 5951e88f64ebf159166a1176
-title: 24 game
+title: 24 点游戏
challengeType: 5
forumTopicId: 302218
dashedName: 24-game
@@ -8,23 +8,23 @@ dashedName: 24-game
# --description--
-The [24 Game](https://en.wikipedia.org/wiki/24_Game) tests a person's mental arithmetic.
+[24 点游戏](https://en.wikipedia.org/wiki/24_Game)测试一个人的心算能力。
-The aim of the game is to arrange four numbers in a way that when evaluated, the result is 24
+游戏的目标是使四个数字的计算结果是 24。
# --instructions--
-Implement a function that takes a string of four digits as its argument, with each digit from 1 to 9 (inclusive) with repetitions allowed, and returns an arithmetic expression that evaluates to the number 24. If no such solution exists, return "no solution exists".
+实现一个函数,该函数将一个四位数的字符串作为其参数,每个数字从 1 到 9(含)并允许重复,并返回一个计算结果为数字 24 的算术表达式。 如果不存在这样的解,则返回“没有解决方案”。
-**Rules:**
+**规则:**
solve24("4878");
| (7-8/8)\*4
|
| solve24("1234");
| 3\*1\*4\*2
|
@@ -33,31 +33,31 @@ Implement a function that takes a string of four digits as its argument, with ea
# --hints--
-`solve24` should be a function.
+`solve24` 应该是一个函数。
```js
assert(typeof solve24 === 'function');
```
-`solve24("4878")` should return `(7-8/8)*4` or `4*(7-8/8)`
+`solve24("4878")` 应该返回 `(7-8/8)*4` 或 `4*(7-8/8)`。
```js
assert(include(answers[0], removeParentheses(solve24(testCases[0]))));
```
-`solve24("1234")` should return any arrangement of `1*2*3*4`
+`solve24("1234")` 应该返回 `1*2*3*4`。
```js
assert(include(answers[1], removeParentheses(solve24(testCases[1]))));
```
-`solve24("6789")` should return `(6*8)/(9-7)` or `(8*6)/(9-7)`
+`solve24("6789")` 应该返回 `(6*8)/(9-7)` 或 `(8*6)/(9-7)`。
```js
assert(include(answers[2], removeParentheses(solve24(testCases[2]))));
```
-`solve24("1127")` should return a permutation of `(1+7)*(1+2)`
+`solve24("1127")` 应该返回 `(1+7)*(1+2)`。
```js
assert(include(answers[3], removeParentheses(solve24(testCases[3]))));
diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/build-javascript-objects.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/build-javascript-objects.md
index 903a089ec7..077f30206d 100644
--- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/build-javascript-objects.md
+++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/build-javascript-objects.md
@@ -26,7 +26,7 @@ var cat = {
};
```
-En este ejemplo, todas las propiedades se almacenan como cadenas, tales como: `name`, `legs` y `tails`. Sin embargo, también puedes utilizar números como propiedades. Incluso puedes omitir las comillas para las propiedades de cadenas de una sola palabra, de la siguiente manera:
+En este ejemplo, todas las propiedades se almacenan como cadenas, como `name`, `legs` y `tails`. Sin embargo, también puedes utilizar números como propiedades. Incluso puedes omitir las comillas para las propiedades de cadenas de una sola palabra, de la siguiente manera:
```js
var anotherObject = {
diff --git a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/build-javascript-objects.md b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/build-javascript-objects.md
index 9f807a21c7..fb9682c4d6 100644
--- a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/build-javascript-objects.md
+++ b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/build-javascript-objects.md
@@ -26,7 +26,7 @@ var cat = {
};
```
-Neste exemplo, todas as propriedades são armazenadas como strings, como - `name`, `legs`e `tails`. Porém, você também pode usar números como propriedades. Você pode até omitir as aspas para propriedades de string com uma única palavra, da seguinte forma:
+Neste exemplo, todas as propriedades são armazenadas como strings, como `name`, `legs` e `tails`. Porém, você também pode usar números como propriedades. Você pode até omitir as aspas para propriedades de string com uma única palavra, da seguinte forma:
```js
var anotherObject = {