Skip to content

Commit

Permalink
update(JS): web/javascript/reference/global_objects/array/push
Browse files Browse the repository at this point in the history
  • Loading branch information
undead404 authored and AdriandeCita committed Nov 7, 2022
1 parent 7338353 commit b14016e
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ const obj = {
// Додавання декількох порожніх об'єктів просто для ілюстрації.
obj.addElem({});
obj.addElem({});
console.log(obj.length);
// → 2
console.log(obj.length); // 2
```

Зверніть увагу, що хоча `obj` не є масивом, метод `push` успішно збільшив властивість `length` у `obj`, так само як якщо це був би реальний масив.
Expand Down

0 comments on commit b14016e

Please sign in to comment.