Skip to content

Commit 598ca68

Browse files
authored
👾 Update summary section
1 parent 206485f commit 598ca68

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎1-js/05-data-types/04-array/article.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ That's simple: don't use the `==` operator. Instead, compare them item-by-item i
512512

513513
Array is a special kind of object, suited to storing and managing ordered data items.
514514

515-
- The declaration:
515+
The declaration:
516516

517517
```js
518518
// square brackets (usual)
@@ -527,6 +527,11 @@ Array is a special kind of object, suited to storing and managing ordered data i
527527
- The `length` property is the array length or, to be precise, its last numeric index plus one. It is auto-adjusted by array methods.
528528
- If we shorten `length` manually, the array is truncated.
529529

530+
Getting the elements:
531+
532+
- we can get element by its index, like `arr[0]`
533+
- also we can use `at(i)` method to get negative-index elements, for negative values of `i`, it steps back from the end of the array. In the rest it works same as `arr[i]`, if `i >= 0`.
534+
530535
We can use an array as a deque with the following operations:
531536

532537
- `push(...items)` adds `items` to the end.

0 commit comments

Comments
 (0)