mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-06 06:39:18 -05:00
chore(i18n,learn): processed translations (#48693)
This commit is contained in:
@@ -28,7 +28,7 @@ const _callback = item => item * 2;
|
||||
assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback)));
|
||||
```
|
||||
|
||||
`["naomi", "quincy", "camperbot"].myMap(element => element.toUpperCase())` should return `["NAOMI", "QUINCY", "CAMPERBOT"]`.
|
||||
`["naomi", "quincy", "camperbot"].myMap(element => element.toUpperCase())` 应该返回 `["NAOMI", "QUINCY", "CAMPERBOT"]`。
|
||||
|
||||
```js
|
||||
const _test_s = ["naomi", "quincy", "camperbot"];
|
||||
@@ -36,7 +36,7 @@ const _callback = element => element.toUpperCase();
|
||||
assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback)));
|
||||
```
|
||||
|
||||
`[1, 1, 2, 5, 2].myMap((element, index, array) => array[index + 1] || array[0])` should return `[1, 2, 5, 2, 1]`.
|
||||
`[1, 1, 2, 5, 2].myMap((element, index, array) => array[index + 1] || array[0])` 应该返回 `[1, 2, 5, 2, 1]`。
|
||||
|
||||
```js
|
||||
const _test_s = [1, 1, 2, 5, 2];
|
||||
@@ -44,7 +44,7 @@ const _callback = (element, index, array) => array[index + 1] || array[0];
|
||||
assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback)));
|
||||
```
|
||||
|
||||
Your code should not use the `map` method.
|
||||
你的代码不应该使用 `map` 方法。
|
||||
|
||||
```js
|
||||
assert(!code.match(/\.?[\s\S]*?map/g));
|
||||
|
||||
@@ -24,7 +24,7 @@ const _callback = item => item % 2;
|
||||
assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback)));
|
||||
```
|
||||
|
||||
`["naomi", "quincy", "camperbot"].myFilter(element => element === "naomi")` should return `["naomi"]`.
|
||||
`["naomi", "quincy", "camperbot"].myFilter(element => element === "naomi")` 应该返回 `["naomi"]`。
|
||||
|
||||
```js
|
||||
const _test_s = ["naomi", "quincy", "camperbot"];
|
||||
@@ -32,7 +32,7 @@ const _callback = element => element === "naomi";
|
||||
assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback)));
|
||||
```
|
||||
|
||||
`[1, 1, 2, 5, 2].myFilter((element, index, array) => array.indexOf(element) === index)` should return `[1, 2, 5]`.
|
||||
`[1, 1, 2, 5, 2].myFilter((element, index, array) => array.indexOf(element) === index)` 应该返回 `[1, 2, 5]`。
|
||||
|
||||
```js
|
||||
const _test_s = [1, 1, 2, 5, 2];
|
||||
@@ -40,7 +40,7 @@ const _callback = (element, index, array) => array.indexOf(element) === index;
|
||||
assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback)));
|
||||
```
|
||||
|
||||
Your code should not use the `filter` method.
|
||||
你的代码不应该使用 `filter` 方法。
|
||||
|
||||
```js
|
||||
assert(!code.match(/\.?[\s\S]*?filter/g));
|
||||
|
||||
Reference in New Issue
Block a user