fix(guide): simplify directory structure

This commit is contained in:
Mrugesh Mohapatra
2018-10-16 21:26:13 +05:30
parent f989c28c52
commit da0df12ab7
35752 changed files with 0 additions and 317652 deletions

View File

@@ -0,0 +1,26 @@
---
title: Array Length
localeTitle: 数组长度
---
## 数组长度
`length`是JavaScript中数组的一个属性它返回或设置给定数组中的元素数。
可以像这样返回数组的`length`属性。
```js
let desserts = ["Cake", "Pie", "Brownies"];
console.log(desserts.length); // 3
```
赋值运算符与`length`属性一起可用于设置数组中的元素数量,如此。
```js
let cars = ["Saab", "BMW", "Volvo"];
cars.length = 2;
console.log(cars.length); // 2
```
#### 更多信息:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\_Objects/Array/length