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 | 82 ---------------------- 1 file changed, 82 deletions(-) delete mode 100644 files/vi/web/javascript/reference/global_objects/array/entries/index.html (limited to 'files/vi/web/javascript/reference/global_objects/array/entries') diff --git a/files/vi/web/javascript/reference/global_objects/array/entries/index.html b/files/vi/web/javascript/reference/global_objects/array/entries/index.html deleted file mode 100644 index 6be2131071..0000000000 --- a/files/vi/web/javascript/reference/global_objects/array/entries/index.html +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: Array.prototype.entries() -slug: Web/JavaScript/Reference/Global_Objects/Array/entries -translation_of: Web/JavaScript/Reference/Global_Objects/Array/entries ---- -
{{JSRef}}
- -

Phương thức entries() trả về một mảng đối tượng Array Iterator chứa cặp key/value cho mỗi chỉ mục trong mảng.

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

Syntax

- -
array.entries()
- -

Return value

- -

Một {{jsxref("Array")}} đối tượng iterator.

- -

Examples

- -

Iterating with index and element

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

Using a for…of loop

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

Specifications

- - - - - - - - - - - - -
Specification
{{SpecName('ESDraft', '#sec-array.prototype.entries', 'Array.prototype.entries')}}
- -

Browser compatibility

- -
- - -

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

-
- -

See also

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