From 95aca4b4d8fa62815d4bd412fff1a364f842814a Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Thu, 29 Apr 2021 16:16:42 -0700 Subject: remove retired locales (#699) --- .../reference/global_objects/array/keys/index.html | 116 --------------------- 1 file changed, 116 deletions(-) delete mode 100644 files/ca/web/javascript/reference/global_objects/array/keys/index.html (limited to 'files/ca/web/javascript/reference/global_objects/array/keys') diff --git a/files/ca/web/javascript/reference/global_objects/array/keys/index.html b/files/ca/web/javascript/reference/global_objects/array/keys/index.html deleted file mode 100644 index a03db832c5..0000000000 --- a/files/ca/web/javascript/reference/global_objects/array/keys/index.html +++ /dev/null @@ -1,116 +0,0 @@ ---- -title: Array.prototype.keys() -slug: Web/JavaScript/Reference/Global_Objects/Array/keys -translation_of: Web/JavaScript/Reference/Global_Objects/Array/keys -original_slug: Web/JavaScript/Referencia/Objectes_globals/Array/keys ---- -
{{JSRef}}
- -

El mètode keys() retorna un nou Array Iterator que conté la clau de cada posició d'un array.

- -

Sintaxi

- -
arr.keys()
- -

Exemples

- -

Ús bàsic

- -
var arr = ["a", "b", "c"];
-var iterator = arr.keys();
-
-console.log(iterator.next()); // { value: 0, done: false }
-console.log(iterator.next()); // { value: 1, done: false }
-console.log(iterator.next()); // { value: 2, done: false }
-console.log(iterator.next()); // { value: undefined, done: true }
-
- -

L'iterador de claus no ignora els forats

- -
var arr = ["a", , "c"];
-var sparseKeys = Object.keys(arr);
-var denseKeys = [...arr.keys()];
-console.log(sparseKeys); // ['0', '2']
-console.log(denseKeys);  // [0, 1, 2]
-
- -

Especificacions

- - - - - - - - - - - - - - - - - - - -
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-array.prototype.keys', 'Array.prototype.keys')}}{{Spec2('ES6')}}Definició inicial.
{{SpecName('ESDraft', '#sec-array.prototype.keys', 'Array.prototype.keys')}}{{Spec2('ESDraft')}} 
- -

Compatibilitat amb navegadors

- -
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - -
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("38")}}{{CompatGeckoDesktop("28")}}{{CompatNo}}{{CompatOpera("25")}}{{CompatSafari("7.1")}}
-
- -
- - - - - - - - - - - - - - - - - - - - - -
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("28")}}{{CompatNo}}{{CompatNo}}8.0
-
- -

Vegeu també

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