mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-12 10:00:39 -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(
|
||||
يجب أن تستخدم وظيفة `htmlColorNames` الطريقة `splice()`
|
||||
|
||||
```js
|
||||
assert(/.splice/.test(code));
|
||||
assert(/.splice/.test(__helpers.removeJSComments(code)));
|
||||
```
|
||||
|
||||
لا يجب عليك استخدام `shift()` أو `unshift()`.
|
||||
|
||||
```js
|
||||
assert(!/shift|unshift/.test(code));
|
||||
assert(!/shift|unshift/.test(__helpers.removeJSComments(code)));
|
||||
```
|
||||
|
||||
لا يجب عليك استخدام 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 @@ users.hasOwnProperty('Alan');
|
||||
|
||||
```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), [
|
||||
يجب أن تستخدم وظيفة `copyMachine` عملية `spread operator` مع القائمة `arr`
|
||||
|
||||
```js
|
||||
assert(code.match(/\.\.\.\s*arr/));
|
||||
assert(__helpers.removeJSComments(__helpers.removeJSComments(code)).match(/\.\.\.\s*arr/));
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
@@ -38,7 +38,7 @@ assert.deepEqual(
|
||||
يجب أن تستخدم وظيفة `forecast` الطريقة `slice()`
|
||||
|
||||
```js
|
||||
assert(/\.slice\(/.test(code));
|
||||
assert(/\.slice\(/.test(__helpers.removeJSComments(code)));
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
@@ -51,7 +51,7 @@ We've defined a function `countOnline` which accepts one argument, `allUsers`. U
|
||||
|
||||
```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);
|
||||
يجب تعيين خاصية `online` باستخدام dot او علامات الأقواس.
|
||||
|
||||
```js
|
||||
assert.strictEqual(code.search(/online: 45/), -1);
|
||||
assert.strictEqual(__helpers.removeJSComments(code).search(/online: 45/), -1);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
@@ -40,7 +40,7 @@ let newArray = array.splice(3, 2);
|
||||
|
||||
```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(
|
||||
يجب أن يستخدم التعلميات البرمجية الخاص بك وظيفة `splice()` علي `arr`.
|
||||
|
||||
```js
|
||||
assert(__helpers.removeWhiteSpace(code).match(/arr\.splice\(/));
|
||||
assert(__helpers.removeWhiteSpace(__helpers.removeJSComments(code)).match(/arr\.splice\(/));
|
||||
```
|
||||
|
||||
يجب فقط إزالة العناصر من `arr` وعدم إضافة أي عناصر إضافية إلى `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 @@ assert(
|
||||
|
||||
```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