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/of/index.html | 121 --------------------- 1 file changed, 121 deletions(-) delete mode 100644 files/ca/web/javascript/reference/global_objects/array/of/index.html (limited to 'files/ca/web/javascript/reference/global_objects/array/of/index.html') diff --git a/files/ca/web/javascript/reference/global_objects/array/of/index.html b/files/ca/web/javascript/reference/global_objects/array/of/index.html deleted file mode 100644 index d6eee05728..0000000000 --- a/files/ca/web/javascript/reference/global_objects/array/of/index.html +++ /dev/null @@ -1,121 +0,0 @@ ---- -title: Array.of() -slug: Web/JavaScript/Reference/Global_Objects/Array/of -translation_of: Web/JavaScript/Reference/Global_Objects/Array/of -original_slug: Web/JavaScript/Referencia/Objectes_globals/Array/of ---- -
{{JSRef}}
- -

El mètode Array.of() crea una nova instància Array amb un nombre variable d'arguments, sense tenir en compte el nombre o el tipus d'arguments.

- -

La diferència entre Array.of() i el constructor Array es troba en el maneig dels arguments sencers: Array.of(42) crea un array amb un sol element, 42, mentre que Array(42) crea un array amb 42 elements, Cadascun dels quals és undefined.

- -

Sintaxi

- -
Array.of(element0[, element1[, ...[, elementN]]])
- -

Paràmetres

- -
-
elementN
-
Elements a partir dels quals es crea l'array.
-
- -

Descripció

- -

Aquesta funció forma part del ECMAScript 6 estàndard. Per més informació vegeu proposta de l'Array.of i Array.from i Array.of polyfill.

- -

Exemples

- -
Array.of(1);         // [1]
-Array.of(1, 2, 3);   // [1, 2, 3]
-Array.of(undefined); // [undefined]
-
- -

Polyfill

- -

Executar el codi següent abans que cap altre codi crearà Array.of() en cas que no es trobi disponible de forma nativa.

- -
if (!Array.of) {
-  Array.of = function() {
-    return Array.prototype.slice.call(arguments);
-  };
-}
-
- -

Especificacions

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

Compatibilitat amb navegadors

- -
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - -
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome(45)}}{{CompatGeckoDesktop("25")}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
-
- -
- - - - - - - - - - - - - - - - - - - - - -
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatChrome(39)}}{{CompatGeckoMobile("25")}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
-
- -

Vegeu també

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