chore(i8n,learn): processed translations (#41462)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 56533eb9ac21ba0edf2244d4
|
||||
title: Comparison with the Greater Than Operator
|
||||
title: 大于运算符
|
||||
challengeType: 1
|
||||
videoUrl: 'https://scrimba.com/c/cp6GbH4'
|
||||
forumTopicId: 16786
|
||||
@ -9,68 +9,70 @@ dashedName: comparison-with-the-greater-than-operator
|
||||
|
||||
# --description--
|
||||
|
||||
The greater than operator (`>`) compares the values of two numbers. If the number to the left is greater than the number to the right, it returns `true`. Otherwise, it returns `false`.
|
||||
使用大于运算符(`>`)来比较两个数字。 如果大于运算符左边的数字大于右边的数字,将会返回 `true`。 否则,它返回 `false`。
|
||||
|
||||
Like the equality operator, greater than operator will convert data types of values while comparing.
|
||||
与相等运算符一样,大于运算符在比较的时候,会转换值的数据类型。
|
||||
|
||||
**Examples**
|
||||
**例如:**
|
||||
|
||||
```js
|
||||
5 > 3 // true
|
||||
7 > '3' // true
|
||||
2 > 3 // false
|
||||
'1' > 9 // false
|
||||
5 > 3
|
||||
7 > '3'
|
||||
2 > 3
|
||||
'1' > 9
|
||||
```
|
||||
|
||||
按顺序,这些表达式会返回 `true`、`true`、`false` 和 `false`。
|
||||
|
||||
# --instructions--
|
||||
|
||||
Add the greater than operator to the indicated lines so that the return statements make sense.
|
||||
添加大于运算符到指定的行,使得返回的语句是有意义的。
|
||||
|
||||
# --hints--
|
||||
|
||||
`testGreaterThan(0)` should return "10 or Under"
|
||||
`testGreaterThan(0)` 应该返回字符串 `10 or Under`。
|
||||
|
||||
```js
|
||||
assert(testGreaterThan(0) === '10 or Under');
|
||||
```
|
||||
|
||||
`testGreaterThan(10)` should return "10 or Under"
|
||||
`testGreaterThan(10)` 应该返回字符串 `10 or Under`。
|
||||
|
||||
```js
|
||||
assert(testGreaterThan(10) === '10 or Under');
|
||||
```
|
||||
|
||||
`testGreaterThan(11)` should return "Over 10"
|
||||
`testGreaterThan(11)` 应该返回字符串 `Over 10`。
|
||||
|
||||
```js
|
||||
assert(testGreaterThan(11) === 'Over 10');
|
||||
```
|
||||
|
||||
`testGreaterThan(99)` should return "Over 10"
|
||||
`testGreaterThan(99)` 应该返回字符串 `Over 10`。
|
||||
|
||||
```js
|
||||
assert(testGreaterThan(99) === 'Over 10');
|
||||
```
|
||||
|
||||
`testGreaterThan(100)` should return "Over 10"
|
||||
`testGreaterThan(100)` 应该返回字符串 `Over 10`。
|
||||
|
||||
```js
|
||||
assert(testGreaterThan(100) === 'Over 10');
|
||||
```
|
||||
|
||||
`testGreaterThan(101)` should return "Over 100"
|
||||
`testGreaterThan(101)` 应该返回字符串 `Over 100`。
|
||||
|
||||
```js
|
||||
assert(testGreaterThan(101) === 'Over 100');
|
||||
```
|
||||
|
||||
`testGreaterThan(150)` should return "Over 100"
|
||||
`testGreaterThan(150)` 应该返回字符串 `Over 100`。
|
||||
|
||||
```js
|
||||
assert(testGreaterThan(150) === 'Over 100');
|
||||
```
|
||||
|
||||
You should use the `>` operator at least twice
|
||||
应该使用 `>` 运算符至少两次。
|
||||
|
||||
```js
|
||||
assert(code.match(/val\s*>\s*('|")*\d+('|")*/g).length > 1);
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 56533eb9ac21ba0edf2244d6
|
||||
title: Comparison with the Less Than Operator
|
||||
title: 小于运算符
|
||||
challengeType: 1
|
||||
videoUrl: 'https://scrimba.com/c/cNVRWtB'
|
||||
forumTopicId: 16789
|
||||
@ -9,61 +9,63 @@ dashedName: comparison-with-the-less-than-operator
|
||||
|
||||
# --description--
|
||||
|
||||
The <dfn>less than</dfn> operator (`<`) compares the values of two numbers. If the number to the left is less than the number to the right, it returns `true`. Otherwise, it returns `false`. Like the equality operator, <dfn>less than</dfn> operator converts data types while comparing.
|
||||
使用小于运算符(`<`)来比较两个数字。 如果小于运算符左边的数字比右边的数字小,它会返回 `true`。 否则会返回 `false`。 与相等运算符类似,小于运算符在做比较的时候会转换值的数据类型。
|
||||
|
||||
**Examples**
|
||||
**例如:**
|
||||
|
||||
```js
|
||||
2 < 5 // true
|
||||
'3' < 7 // true
|
||||
5 < 5 // false
|
||||
3 < 2 // false
|
||||
'8' < 4 // false
|
||||
2 < 5
|
||||
'3' < 7
|
||||
5 < 5
|
||||
3 < 2
|
||||
'8' < 4
|
||||
```
|
||||
|
||||
按顺序,这些表达式会返回 `true`、`true`、`false`、`false` 和 `false`。
|
||||
|
||||
# --instructions--
|
||||
|
||||
Add the less than operator to the indicated lines so that the return statements make sense.
|
||||
添加小于运算符到指定行,使得函数的返回语句有意义。
|
||||
|
||||
# --hints--
|
||||
|
||||
`testLessThan(0)` should return "Under 25"
|
||||
`testLessThan(0)` 应该返回字符串 `Under 25`。
|
||||
|
||||
```js
|
||||
assert(testLessThan(0) === 'Under 25');
|
||||
```
|
||||
|
||||
`testLessThan(24)` should return "Under 25"
|
||||
`testLessThan(24)` 应该返回字符串 `Under 25`。
|
||||
|
||||
```js
|
||||
assert(testLessThan(24) === 'Under 25');
|
||||
```
|
||||
|
||||
`testLessThan(25)` should return "Under 55"
|
||||
`testLessThan(25)` 应该返回字符串 `Under 55`。
|
||||
|
||||
```js
|
||||
assert(testLessThan(25) === 'Under 55');
|
||||
```
|
||||
|
||||
`testLessThan(54)` should return "Under 55"
|
||||
`testLessThan(54)` 应该返回字符串 `Under 55`。
|
||||
|
||||
```js
|
||||
assert(testLessThan(54) === 'Under 55');
|
||||
```
|
||||
|
||||
`testLessThan(55)` should return "55 or Over"
|
||||
`testLessThan(55)` 应该返回字符串 `55 or Over`。
|
||||
|
||||
```js
|
||||
assert(testLessThan(55) === '55 or Over');
|
||||
```
|
||||
|
||||
`testLessThan(99)` should return "55 or Over"
|
||||
`testLessThan(99)` 应该返回字符串 `55 or Over`。
|
||||
|
||||
```js
|
||||
assert(testLessThan(99) === '55 or Over');
|
||||
```
|
||||
|
||||
You should use the `<` operator at least twice
|
||||
应该使用 `<` 运算符至少两次。
|
||||
|
||||
```js
|
||||
assert(code.match(/val\s*<\s*('|")*\d+('|")*/g).length > 1);
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 56533eb9ac21ba0edf2244d3
|
||||
title: Comparison with the Strict Inequality Operator
|
||||
title: 严格不等运算符
|
||||
challengeType: 1
|
||||
videoUrl: 'https://scrimba.com/c/cKekkUy'
|
||||
forumTopicId: 16791
|
||||
@ -9,47 +9,49 @@ dashedName: comparison-with-the-strict-inequality-operator
|
||||
|
||||
# --description--
|
||||
|
||||
The strict inequality operator (`!==`) is the logical opposite of the strict equality operator. It means "Strictly Not Equal" and returns `false` where strict equality would return `true` and *vice versa*. Strict inequality will not convert data types.
|
||||
严格不相等运算符(`!==`)与全等运算符是相反的。 这意味着严格不相等并返回 `false` 的地方,用严格相等运算符会返回 `true`,*反之亦然*。 严格不相等运算符不会转换值的数据类型。
|
||||
|
||||
**Examples**
|
||||
**示例**
|
||||
|
||||
```js
|
||||
3 !== 3 // false
|
||||
3 !== '3' // true
|
||||
4 !== 3 // true
|
||||
3 !== 3
|
||||
3 !== '3'
|
||||
4 !== 3
|
||||
```
|
||||
|
||||
按顺序,这些表达式会返回 `false`、`true`、`true`。
|
||||
|
||||
# --instructions--
|
||||
|
||||
Add the strict inequality operator to the `if` statement so the function will return "Not Equal" when `val` is not strictly equal to `17`
|
||||
在 `if` 语句中,添加严格不相等运算符,这样函数在当 `val` 不严格等于 `17` 的时候,会返回 `Not Equal`。
|
||||
|
||||
# --hints--
|
||||
|
||||
`testStrictNotEqual(17)` should return "Equal"
|
||||
`testStrictNotEqual(17)` 应该返回字符串 `Equal`
|
||||
|
||||
```js
|
||||
assert(testStrictNotEqual(17) === 'Equal');
|
||||
```
|
||||
|
||||
`testStrictNotEqual("17")` should return "Not Equal"
|
||||
`testStrictNotEqual("17")` 应该返回字符串 `Not Equal`
|
||||
|
||||
```js
|
||||
assert(testStrictNotEqual('17') === 'Not Equal');
|
||||
```
|
||||
|
||||
`testStrictNotEqual(12)` should return "Not Equal"
|
||||
`testStrictNotEqual(12)` 应该返回字符串 `Not Equal`
|
||||
|
||||
```js
|
||||
assert(testStrictNotEqual(12) === 'Not Equal');
|
||||
```
|
||||
|
||||
`testStrictNotEqual("bob")` should return "Not Equal"
|
||||
`testStrictNotEqual("bob")` 应该返回字符串 `Not Equal`
|
||||
|
||||
```js
|
||||
assert(testStrictNotEqual('bob') === 'Not Equal');
|
||||
```
|
||||
|
||||
You should use the `!==` operator
|
||||
应该使用 `!==` 运算符。
|
||||
|
||||
```js
|
||||
assert(code.match(/(val\s*!==\s*\d+)|(\d+\s*!==\s*val)/g).length > 0);
|
||||
|
Reference in New Issue
Block a user