From 52ccdf1f0a1cee3f0659ac78e81c79dae152399b Mon Sep 17 00:00:00 2001 From: MDN Date: Wed, 23 Jun 2021 00:34:06 +0000 Subject: [CRON] sync translated content --- .../global_objects/map/entries/index.html | 72 ---------------------- 1 file changed, 72 deletions(-) delete mode 100644 files/zh-cn/web/javascript/reference/global_objects/map/entries/index.html (limited to 'files/zh-cn/web/javascript/reference/global_objects/map/entries') diff --git a/files/zh-cn/web/javascript/reference/global_objects/map/entries/index.html b/files/zh-cn/web/javascript/reference/global_objects/map/entries/index.html deleted file mode 100644 index f97881755e..0000000000 --- a/files/zh-cn/web/javascript/reference/global_objects/map/entries/index.html +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: Map.prototype.entries() -slug: Web/JavaScript/Reference/Global_Objects/Map/entries -tags: - - Map -translation_of: Web/JavaScript/Reference/Global_Objects/Map/entries ---- -
{{JSRef}}
- -

entries() 方法返回一个新的包含 [key, value] 对的 Iterator 对象,返回的迭代器的迭代顺序与 Map 对象的插入顺序相同。

- -

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

- -

语法

- -
myMap.entries()
-
- -

返回值

- -

一个新的 {{jsxref("Map")}} 迭代器对象.

- -

示例

- -

entries()的使用

- -
var myMap = new Map();
-myMap.set("0", "foo");
-myMap.set(1, "bar");
-myMap.set({}, "baz");
-
-var mapIter = myMap.entries();
-
-console.log(mapIter.next().value); // ["0", "foo"]
-console.log(mapIter.next().value); // [1, "bar"]
-console.log(mapIter.next().value); // [Object, "baz"]
-
- -

规范

- - - - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('ESDraft', '#sec-map.prototype.entries', 'Map.prototype.entries')}}{{Spec2('ESDraft')}}
{{SpecName('ES2015', '#sec-map.prototype.entries', 'Map.prototype.entries')}}{{Spec2('ES2015')}}Initial definition.
- -

浏览器兼容性

- -

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

- -

相关链接

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