From f3bfeb89f97f0bbf4bfd09ab507395ee321c1413 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Fri, 23 Jul 2021 11:06:19 -0400 Subject: wasn't supposed to be orphaned (ja) (#1672) * wasn't supposed to be orphaned (ja) * fix redirects * fix slug front-matter --- .../global_objects/map/entries/index.html | 70 ++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 files/ja/web/javascript/reference/global_objects/map/entries/index.html (limited to 'files/ja/web/javascript/reference/global_objects/map/entries') diff --git a/files/ja/web/javascript/reference/global_objects/map/entries/index.html b/files/ja/web/javascript/reference/global_objects/map/entries/index.html new file mode 100644 index 0000000000..749cf2c6f8 --- /dev/null +++ b/files/ja/web/javascript/reference/global_objects/map/entries/index.html @@ -0,0 +1,70 @@ +--- +title: Map.prototype.entries() +slug: Web/JavaScript/Reference/Global_Objects/Map/entries +tags: + - ECMAScript 2015 + - Iterator + - JavaScript + - Map + - Method + - Prototype +translation_of: Web/JavaScript/Reference/Global_Objects/Map/entries +original_slug: Web/JavaScript/Reference/Global_Objects/Map/entries +--- +
{{JSRef}}
+ +

entries() メソッドは、挿入順で Map オブジェクトの要素に対する [key, value] ペアを含む新しい Iterator オブジェクトを返します。

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

構文

+ +
myMap.entries()
+ +

返値

+ +

新しい {{jsxref("Map")}} の反復子オブジェクトです。

+ +

+ +

entries() の使用

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

仕様書

+ + + + + + + + + + + + +
仕様書
{{SpecName('ESDraft', '#sec-map.prototype.entries', 'Map.prototype.entries')}}
+ +

ブラウザーの互換性

+ +

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

+ +

関連情報

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