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

This commit is contained in:
camperbot
2022-04-27 21:27:55 +05:30
committed by GitHub
parent a139a4fe63
commit 41e3320897
72 changed files with 9177 additions and 181 deletions

View File

@@ -19,21 +19,19 @@ dashedName: access-array-data-with-indexes
```js
const array = [50, 60, 70];
array[0];
console.log(array[0]);
const data = array[1];
```
现在 `array[0]` 的值是 `50` `data` 的值为 `60`.
**注意:**数组名与方括号之间不应该有任何空格,比如`array [0]` 。 尽管 JavaScript 能够正确处理这种情况,但是当其他程序员阅读你写的代码时,这可能让他们感到困惑。
`console.log(array[0])` 打印 `50``data` 的值为 `60`
# --instructions--
创建一个名为 `myData` 的变量,使用括号取出 `myArray` 数组中第一个元素的值并将其赋值给新创建的变量
创建一个名为 `myData` 的变量,使用括号表示法将其设置为等于 `myArray` 的第一个值
# --hints--
变量 `myData` 应该等于`myArray` 数组中第一个元素的值。
变量 `myData` 应该等于 `myArray`第一个值。
```js
assert(
@@ -51,7 +49,7 @@ assert(
);
```
使用括号访问变量 `myArray` 中的数据。
应使用括号表示法访问变量 `myArray` 中的数据。
```js
assert(

View File

@@ -15,13 +15,13 @@ dashedName: find-the-length-of-a-string
console.log("Alan Peter".length);
```
字符串 `10`会出现在控制台中。
`10`显示在控制台中。 请注意“Alan” 和 “Peter” 之间的空格字符也被计算在内。
例如,如果我们创建了一个变量 `const firstName = "Ada"`,我们可以通过使用 `firstName.length` 找出字符串 `Ada` 的长度属性。
# --instructions--
使用 `.length` 属性来获得变量 `lastName` 的长度,并把它赋值给变量 `lastNameLength`
使用 `.length` 属性 `lastNameLength` 设置为 `lastName` 中的字符数
# --hints--