From 4b1a9203c547c019fc5398082ae19a3f3d4c3efe Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:41:15 -0500 Subject: initial commit --- .../global_objects/weakmap/get/index.html | 115 +++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 files/ca/web/javascript/reference/global_objects/weakmap/get/index.html (limited to 'files/ca/web/javascript/reference/global_objects/weakmap/get') diff --git a/files/ca/web/javascript/reference/global_objects/weakmap/get/index.html b/files/ca/web/javascript/reference/global_objects/weakmap/get/index.html new file mode 100644 index 0000000000..f69ca1aa58 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/weakmap/get/index.html @@ -0,0 +1,115 @@ +--- +title: WeakMap.prototype.get() +slug: Web/JavaScript/Reference/Global_Objects/WeakMap/get +translation_of: Web/JavaScript/Reference/Global_Objects/WeakMap/get +--- +
{{JSRef}}
+ +

El mètode get() retorna un element especificat d'un objecte WeakMap.

+ +

Sintaxi

+ +
wm.get(key);
+ +

Paràmetres

+ +
+
key
+
Necessari. La clau d'un element a retornar de l'objecte WeakMap.
+
+ +

Valor a retornar

+ +

Retorna l'element associat a la clau especificada o undefined si no es pot trobar la clau en l'objecte WeakMap.

+ +

Exemples

+ +

Utilitzar el mètode get

+ +
var wm = new WeakMap();
+wm.set(window, "foo");
+
+wm.get(window); // Retorna "foo".
+wm.get("baz");  // Retorna undefined.
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-weakmap.prototype.get', 'WeakMap.prototype.get')}}{{Spec2('ES6')}}Definició inicial
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic36{{CompatGeckoDesktop("6.0")}}11237.1
+
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatGeckoMobile("6.0")}}{{CompatNo}}{{CompatNo}}8
+
+ +

Notes específiques per a Firefox

+ + + +

Vegeu també

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