chore(i18n,learn): processed translations (#49483)

This commit is contained in:
camperbot
2023-02-23 23:44:20 +05:30
committed by GitHub
parent d6bad55e6d
commit 02ac246693
265 changed files with 945 additions and 945 deletions

View File

@@ -9,31 +9,31 @@ dashedName: escape-sequences-in-strings
# --description--
引号不是字符串中唯一可以被转义(<dfn>escaped</dfn>)的字符。 Escape sequences allow you to use characters you may not otherwise be able to use in a string.
引号不是字符串中唯一可以被转义(<dfn>escaped</dfn>)的字符。 转义字符允许你使用可能无法在字符串中使用的字符。
<table class='table table-striped'><thead><tr><th>代码</th><th>输出</th></tr></thead><tbody><tr><td><code>\'</code></td><td>单引号</td></tr><tr><td><code>\"</code></td><td>双引号</td></tr><tr><td><code>\\</code></td><td>反斜杠</td></tr><tr><td><code>\n</code></td><td>换行符</td></tr><tr><td><code>\t</code></td><td>制表符</td></tr><tr><td><code>\r</code></td><td>回车</td></tr><tr><td><code>\b</code></td><td>退格</td></tr><tr><td><code>\f</code></td><td>换页符</td></tr></tbody></table>
*Note that the backslash itself must be escaped in order to display as a backslash.*
*请注意,反斜线本身必须被转义,才能显示为反斜线。*
# --instructions--
Assign the following three lines of text into the single variable `myStr` using escape sequences.
使用转义字符把下面三行文本赋值给一个变量 `myStr`
<blockquote>FirstLine<br>    \SecondLine<br>ThirdLine</blockquote>
You will need to use escape sequences to insert special characters correctly. You will also need to follow the spacing as it looks above, with no spaces between escape sequences or words.
你需要使用转义字符正确地插入特殊字符。 你也需要确保间距与上面文本一致,并且单词或转义字符之间没有空格。
**Note:** The indentation for `SecondLine` is achieved with the tab escape character, not spaces.
**注意:**`SecondLine` 前面的空白是制表符,而不是空格。
# --hints--
`myStr` should not contain any spaces
`myStr` 不能包含空格。
```js
assert(!/ /.test(myStr));
```
`myStr` should contain the strings `FirstLine`, `SecondLine` and `ThirdLine` (remember case sensitivity)
`myStr` 应包含字符串 `FirstLine``SecondLine` `ThirdLine`(记得区分大小写)。
```js
assert(
@@ -41,31 +41,31 @@ assert(
);
```
`FirstLine` should be followed by the newline character `\n`
`FirstLine` 后面应该是一个换行符 `\n`
```js
assert(/FirstLine\n/.test(myStr));
```
`myStr` should contain a tab character `\t` which follows a newline character
`myStr` 应该包含一个制表符 `\t`,它在换行符后面。
```js
assert(/\n\t/.test(myStr));
```
`SecondLine` should be preceded by the backslash character `\`
`SecondLine` 前面应该是反斜杠 `\`
```js
assert(/\\SecondLine/.test(myStr));
```
There should be a newline character between `SecondLine` and `ThirdLine`
`SecondLine` `ThirdLine` 之间应该是换行符。
```js
assert(/SecondLine\nThirdLine/.test(myStr));
```
`myStr` should only contain characters shown in the instructions
`myStr` 应该只包含上面要求的字符。
```js
assert(myStr === 'FirstLine\n\t\\SecondLine\nThirdLine');

View File

@@ -15,13 +15,13 @@ dashedName: finding-a-remainder-in-javascript
<pre>
5 % 2 = 1
5 / 2 = 2 remainder 1
5 / 2 = 2 1
2 * 2 = 4
5 - 4 = 1
</pre>
**Usage**
In mathematics, a number can be checked to be even or odd by checking the remainder of the division of the number by `2`. Even numbers have a remainder of `0`, while odd numbers a remainder of `1`.
**用法**
在数学中,判断一个数是奇数还是偶数,只需要判断这个数除以 `2` 得到的余数是 0 还是 1。 如果是偶数,余数是 `0`,而如果是奇数,余数是 `1`
<pre>
17 % 2 = 1

View File

@@ -23,7 +23,7 @@ function testFun(param1, param2) {
# --instructions--
<ol><li>创建一个名为 <code>functionWithArgs</code> 的函数,它可以接收两个参数,计算参数的和,将结果输出到控制台。</li><li>两个数字作为参数调用函数。</li></ol>
<ol><li>创建一个名为 <code>functionWithArgs</code> 的函数,它可以接收两个参数,计算参数的和,将结果输出到控制台。</li><li>自己指定两个数字作为参数,运行函数 functionWithArgs。</li></ol>
# --hints--

View File

@@ -15,7 +15,7 @@ dashedName: understanding-boolean-values
# --instructions--
Modify the `welcomeToBooleans` function so that it returns `true` instead of `false`.
修改 `welcomeToBooleans` 函数,让它返回 `true` 而不是 `false`
# --hints--