From 95aca4b4d8fa62815d4bd412fff1a364f842814a Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Thu, 29 Apr 2021 16:16:42 -0700 Subject: remove retired locales (#699) --- .../global_objects/array/entries/index.html | 96 ---------------------- 1 file changed, 96 deletions(-) delete mode 100644 files/uk/web/javascript/reference/global_objects/array/entries/index.html (limited to 'files/uk/web/javascript/reference/global_objects/array/entries/index.html') diff --git a/files/uk/web/javascript/reference/global_objects/array/entries/index.html b/files/uk/web/javascript/reference/global_objects/array/entries/index.html deleted file mode 100644 index b55d83c2e5..0000000000 --- a/files/uk/web/javascript/reference/global_objects/array/entries/index.html +++ /dev/null @@ -1,96 +0,0 @@ ---- -title: Array.prototype.entries() -slug: Web/JavaScript/Reference/Global_Objects/Array/entries -tags: - - Array - - ECMAScript6 - - JavaScript - - Ітератор - - Масив - - метод -translation_of: Web/JavaScript/Reference/Global_Objects/Array/entries ---- -
{{JSRef}}
- -

Метод entries() повертає новий об'єкт ітератора масиву (Array Iterator), який містить пари ключ-значення для кожного індексу в масиві.

- -
{{EmbedInteractiveExample("pages/js/array-entries.html")}}
- - - -

Синтаксис

- -
array.entries()
- -

Значення, яке повертається

- -

Новий об'єкт ітератора {{jsxref("Array", "масиву")}}.

- -

Приклади

- -

Ітерування за індексом та елементом

- -
const a = ['a', 'b', 'c'];
-
-for (const [index, element] of a.entries())
-  console.log(index, element);
-
-// 0 'a'
-// 1 'b'
-// 2 'c'
-
- -

Використання циклу for…of

- -
var a = ['a', 'b', 'c'];
-var iterator = a.entries();
-
-for (let e of iterator) {
-  console.log(e);
-}
-// [0, 'a']
-// [1, 'b']
-// [2, 'c']
-
- -

Специфікації

- - - - - - - - - - - - - - - - - - - -
СпецифікаціяСтатусКоментар
{{SpecName('ES2015', '#sec-array.prototype.entries', 'Array.prototype.entries')}}{{Spec2('ES2015')}}Початкове визначення.
{{SpecName('ESDraft', '#sec-array.prototype.entries', 'Array.prototype.entries')}}{{Spec2('ESDraft')}}
- -

Сумісність з веб-переглядачами

- -
- - -

{{Compat("javascript.builtins.Array.entries")}}

-
- -

Див. також

- - -- cgit v1.2.3-54-g00ecf