From da78a9e329e272dedb2400b79a3bdeebff387d47 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:17 -0500 Subject: initial commit --- .../reference/global_objects/set/values/index.html | 114 +++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 files/it/web/javascript/reference/global_objects/set/values/index.html (limited to 'files/it/web/javascript/reference/global_objects/set/values/index.html') diff --git a/files/it/web/javascript/reference/global_objects/set/values/index.html b/files/it/web/javascript/reference/global_objects/set/values/index.html new file mode 100644 index 0000000000..e662f3d62d --- /dev/null +++ b/files/it/web/javascript/reference/global_objects/set/values/index.html @@ -0,0 +1,114 @@ +--- +title: Set.prototype.values() +slug: Web/JavaScript/Reference/Global_Objects/Set/values +translation_of: Web/JavaScript/Reference/Global_Objects/Set/values +--- +
{{JSRef}}
+ +

Il metodo values() restituisce un nuovo oggetto di tipo Iterator che contiene tutti i valori presenti nell'oggetto Set, nell'ordine con cui sono stati inseriti.

+ +

Il metodo keys() è un alias per questo metodo (in modo da mantenere api simili all'oggetto {{jsxref("Map")}}); si comporta esattamente allo stesss modo e restiuisce i valori contenuti nell'oggetto Set.

+ +

Sintassi

+ +
mySet.values();
+
+ +

Valore restituito

+ +

Un nuovo oggetto di tipo Iterator che contiene tutti i valori presenti nell'oggetto Set, nell'ordine con cui sono stati inseriti.

+ +

Esempi

+ +

Uso di values()

+ +
var mySet = new Set();
+mySet.add("foo");
+mySet.add("bar");
+mySet.add("baz");
+
+var setIter = mySet.values();
+
+console.log(setIter.next().value); // "foo"
+console.log(setIter.next().value); // "bar"
+console.log(setIter.next().value); // "baz"
+ +

Specifiche

+ + + + + + + + + + + + + + + + + + + +
SpecificheStatoCommenti
{{SpecName('ES6', '#sec-set.prototype.values', 'Set.prototype.values')}}{{Spec2('ES6')}}Initial definition.
{{SpecName('ESDraft', '#sec-set.prototype.values', 'Set.prototype.values')}}{{Spec2('ESDraft')}} 
+ +

Compatibilità browser

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support38{{CompatGeckoDesktop("24")}}{{CompatNo}}257.1
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatNo}}38{{ CompatGeckoMobile("24") }}{{ CompatNo}}{{ CompatNo}}8
+
+ +

Vedi anche

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