From cb9e359a51c3249d8f5157db69d43fd413ddeda6 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 14:45:12 +0100 Subject: unslug ca: move --- .../global_objects/set/entries/index.html | 104 +++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 files/ca/web/javascript/reference/global_objects/set/entries/index.html (limited to 'files/ca/web/javascript/reference/global_objects/set/entries') diff --git a/files/ca/web/javascript/reference/global_objects/set/entries/index.html b/files/ca/web/javascript/reference/global_objects/set/entries/index.html new file mode 100644 index 0000000000..848e53ba8d --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/set/entries/index.html @@ -0,0 +1,104 @@ +--- +title: Set.prototype.entries() +slug: Web/JavaScript/Referencia/Objectes_globals/Set/entries +translation_of: Web/JavaScript/Reference/Global_Objects/Set/entries +--- +
{{JSRef}}
+ +

El mètode entries() retorna un nou objecte Iterator que conté un array de [valor, valor] per a cada element emmagatzemat dins l'objecte Set, ordenats per ordre d'inserció. Els elements de l'objecte Set no disposen de claus, a diferència dels objectes Map. Tot i així, per a oferir una API similar a la de l'objecte Map cada entrada té el mateix valor tant com per a la clau com per al valor. És per això que es retorna un array [valor, valor].

+ +

Sintaxi

+ +
mySet.entries()
+ +

Examples

+ +

Using entries()

+ +
var mySet = new Set();
+mySet.add("foobar");
+mySet.add(1);
+mySet.add("baz");
+
+var setIter = mySet.entries();
+
+console.log(setIter.next().value); // ["foobar", "foobar"]
+console.log(setIter.next().value); // [1, 1]
+console.log(setIter.next().value); // ["baz", "baz"]
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-set.prototype.entries', 'Set.prototype.entries')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic38{{ CompatGeckoDesktop("24") }}{{CompatNo}}257.1
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}38{{ CompatGeckoMobile("24") }}{{CompatNo}}{{CompatNo}}8
+
+ +

Vegeu també

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