minor fixes
This commit is contained in:
parent
e5fc2f15ed
commit
89684c61ff
1 changed files with 7 additions and 7 deletions
|
@ -514,15 +514,15 @@ Array is a special kind of object, suited to storing and managing ordered data i
|
|||
|
||||
The declaration:
|
||||
|
||||
```js
|
||||
// square brackets (usual)
|
||||
let arr = [item1, item2...];
|
||||
```js
|
||||
// square brackets (usual)
|
||||
let arr = [item1, item2...];
|
||||
|
||||
// new Array (exceptionally rare)
|
||||
let arr = new Array(item1, item2...);
|
||||
```
|
||||
// new Array (exceptionally rare)
|
||||
let arr = new Array(item1, item2...);
|
||||
```
|
||||
|
||||
The call to `new Array(number)` creates an array with the given length, but without elements.
|
||||
The call to `new Array(number)` creates an array with the given length, but without elements.
|
||||
|
||||
- The `length` property is the array length or, to be precise, its last numeric index plus one. It is auto-adjusted by array methods.
|
||||
- If we shorten `length` manually, the array is truncated.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue