mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-12 01:00:13 -04:00
chore(i18n,learn): processed translations (#54537)
Co-authored-by: Naomi <nhcarrigan@gmail.com>
This commit is contained in:
committed by
GitHub
parent
adfb87e898
commit
e6b05ee25d
@@ -53,19 +53,19 @@ assert.deepEqual(
|
||||
The `htmlColorNames` function should utilize the `splice()` method
|
||||
|
||||
```js
|
||||
assert(/.splice/.test(code));
|
||||
assert(/.splice/.test(__helpers.removeJSComments(code)));
|
||||
```
|
||||
|
||||
You should not use `shift()` or `unshift()`.
|
||||
|
||||
```js
|
||||
assert(!/shift|unshift/.test(code));
|
||||
assert(!/shift|unshift/.test(__helpers.removeJSComments(code)));
|
||||
```
|
||||
|
||||
You should not use array bracket notation.
|
||||
|
||||
```js
|
||||
assert(!/\[\d\]\s*=/.test(code));
|
||||
assert(!/\[\d\]\s*=/.test(__helpers.removeJSComments(code)));
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
@@ -85,8 +85,8 @@ The definition of the `foods` object should not be changed.
|
||||
|
||||
```js
|
||||
assert(
|
||||
code.search(/let foods/) === -1 &&
|
||||
code.search(/const\s+foods\s*=\s*{\s*apples:\s*25,\s*oranges:\s*32,\s*plums:\s*28\s*};/
|
||||
__helpers.removeJSComments(code).search(/let foods/) === -1 &&
|
||||
__helpers.removeJSComments(code).search(/const\s+foods\s*=\s*{\s*apples:\s*25,\s*oranges:\s*32,\s*plums:\s*28\s*};/
|
||||
) !== -1
|
||||
);
|
||||
```
|
||||
|
||||
@@ -27,7 +27,7 @@ The `users` object should not be accessed directly
|
||||
|
||||
```js
|
||||
|
||||
assert(code.match(/users/gm).length <= 2)
|
||||
assert(__helpers.removeJSComments(code).match(/users/gm).length <= 2)
|
||||
|
||||
```
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ assert.deepEqual(copyMachine(['it works'], 3), [
|
||||
The `copyMachine` function should utilize the `spread operator` with array `arr`
|
||||
|
||||
```js
|
||||
assert(code.match(/\.\.\.\s*arr/));
|
||||
assert(__helpers.removeJSComments(__helpers.removeJSComments(code)).match(/\.\.\.\s*arr/));
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
@@ -38,7 +38,7 @@ assert.deepEqual(
|
||||
The `forecast` function should utilize the `slice()` method
|
||||
|
||||
```js
|
||||
assert(/\.slice\(/.test(code));
|
||||
assert(/\.slice\(/.test(__helpers.removeJSComments(code)));
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
@@ -51,7 +51,7 @@ The function `countOnline` should use a `for in` statement to iterate through th
|
||||
|
||||
```js
|
||||
assert(
|
||||
code.match(
|
||||
__helpers.removeJSComments(code).match(
|
||||
/for\s*\(\s*(var|let|const)\s+[a-zA-Z_$]\w*\s+in\s+[a-zA-Z_$]\w*\s*\)/
|
||||
)
|
||||
);
|
||||
|
||||
@@ -61,7 +61,7 @@ assert(userActivity.data.online === 45);
|
||||
The `online` property should be set using dot or bracket notation.
|
||||
|
||||
```js
|
||||
assert.strictEqual(code.search(/online: 45/), -1);
|
||||
assert.strictEqual(__helpers.removeJSComments(code).search(/online: 45/), -1);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
@@ -40,7 +40,7 @@ You should not change the original line of `const arr = [2, 4, 5, 1, 7, 5, 2, 1]
|
||||
|
||||
```js
|
||||
assert(
|
||||
__helpers.removeWhiteSpace(code).match(/constarr=\[2,4,5,1,7,5,2,1\];?/)
|
||||
__helpers.removeWhiteSpace(__helpers.removeJSComments(code)).match(/constarr=\[2,4,5,1,7,5,2,1\];?/)
|
||||
);
|
||||
```
|
||||
|
||||
@@ -56,14 +56,14 @@ assert.strictEqual(
|
||||
Your code should utilize the `splice()` method on `arr`.
|
||||
|
||||
```js
|
||||
assert(__helpers.removeWhiteSpace(code).match(/arr\.splice\(/));
|
||||
assert(__helpers.removeWhiteSpace(__helpers.removeJSComments(code)).match(/arr\.splice\(/));
|
||||
```
|
||||
|
||||
The splice should only remove elements from `arr` and not add any additional elements to `arr`.
|
||||
|
||||
```js
|
||||
assert(
|
||||
!__helpers.removeWhiteSpace(code).match(/arr\.splice\(\d+,\d+,\d+.*\)/g)
|
||||
!__helpers.removeWhiteSpace(__helpers.removeJSComments(code)).match(/arr\.splice\(\d+,\d+,\d+.*\)/g)
|
||||
);
|
||||
```
|
||||
|
||||
|
||||
@@ -39,9 +39,9 @@ The `oranges`, `plums`, and `strawberries` keys should be removed using `delete`
|
||||
|
||||
```js
|
||||
assert(
|
||||
code.search(/oranges:/) !== -1 &&
|
||||
code.search(/plums:/) !== -1 &&
|
||||
code.search(/strawberries:/) !== -1
|
||||
__helpers.removeJSComments(code).search(/oranges:/) !== -1 &&
|
||||
__helpers.removeJSComments(code).search(/plums:/) !== -1 &&
|
||||
__helpers.removeJSComments(code).search(/strawberries:/) !== -1
|
||||
);
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user