aboutsummaryrefslogtreecommitdiff
path: root/files/it/web/javascript/reference/global_objects/array
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:17 -0500
commitda78a9e329e272dedb2400b79a3bdeebff387d47 (patch)
treee6ef8aa7c43556f55ddfe031a01cf0a8fa271bfe /files/it/web/javascript/reference/global_objects/array
parent1109132f09d75da9a28b649c7677bb6ce07c40c0 (diff)
downloadtranslated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.tar.gz
translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.tar.bz2
translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.zip
initial commit
Diffstat (limited to 'files/it/web/javascript/reference/global_objects/array')
-rw-r--r--files/it/web/javascript/reference/global_objects/array/concat/index.html188
-rw-r--r--files/it/web/javascript/reference/global_objects/array/copywithin/index.html180
-rw-r--r--files/it/web/javascript/reference/global_objects/array/entries/index.html77
-rw-r--r--files/it/web/javascript/reference/global_objects/array/every/index.html184
-rw-r--r--files/it/web/javascript/reference/global_objects/array/fill/index.html155
-rw-r--r--files/it/web/javascript/reference/global_objects/array/filter/index.html245
-rw-r--r--files/it/web/javascript/reference/global_objects/array/find/index.html216
-rw-r--r--files/it/web/javascript/reference/global_objects/array/findindex/index.html182
-rw-r--r--files/it/web/javascript/reference/global_objects/array/flat/index.html159
-rw-r--r--files/it/web/javascript/reference/global_objects/array/flatmap/index.html142
-rw-r--r--files/it/web/javascript/reference/global_objects/array/foreach/index.html331
-rw-r--r--files/it/web/javascript/reference/global_objects/array/from/index.html242
-rw-r--r--files/it/web/javascript/reference/global_objects/array/includes/index.html162
-rw-r--r--files/it/web/javascript/reference/global_objects/array/index.html480
-rw-r--r--files/it/web/javascript/reference/global_objects/array/indexof/index.html226
-rw-r--r--files/it/web/javascript/reference/global_objects/array/isarray/index.html133
-rw-r--r--files/it/web/javascript/reference/global_objects/array/join/index.html112
-rw-r--r--files/it/web/javascript/reference/global_objects/array/keys/index.html74
-rw-r--r--files/it/web/javascript/reference/global_objects/array/lastindexof/index.html169
-rw-r--r--files/it/web/javascript/reference/global_objects/array/length/index.html129
-rw-r--r--files/it/web/javascript/reference/global_objects/array/map/index.html323
-rw-r--r--files/it/web/javascript/reference/global_objects/array/of/index.html92
-rw-r--r--files/it/web/javascript/reference/global_objects/array/pop/index.html117
-rw-r--r--files/it/web/javascript/reference/global_objects/array/prototype/index.html203
-rw-r--r--files/it/web/javascript/reference/global_objects/array/push/index.html142
-rw-r--r--files/it/web/javascript/reference/global_objects/array/reduce/index.html576
-rw-r--r--files/it/web/javascript/reference/global_objects/array/reverse/index.html133
-rw-r--r--files/it/web/javascript/reference/global_objects/array/slice/index.html241
-rw-r--r--files/it/web/javascript/reference/global_objects/array/some/index.html202
-rw-r--r--files/it/web/javascript/reference/global_objects/array/sort/index.html267
-rw-r--r--files/it/web/javascript/reference/global_objects/array/splice/index.html163
-rw-r--r--files/it/web/javascript/reference/global_objects/array/tostring/index.html80
-rw-r--r--files/it/web/javascript/reference/global_objects/array/unshift/index.html98
-rw-r--r--files/it/web/javascript/reference/global_objects/array/values/index.html87
34 files changed, 6510 insertions, 0 deletions
diff --git a/files/it/web/javascript/reference/global_objects/array/concat/index.html b/files/it/web/javascript/reference/global_objects/array/concat/index.html
new file mode 100644
index 0000000000..9d8d7d6629
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/concat/index.html
@@ -0,0 +1,188 @@
+---
+title: Array.prototype.concat()
+slug: Web/JavaScript/Reference/Global_Objects/Array/concat
+tags:
+ - Array
+ - aggiungi elementi array
+ - concat
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/concat
+---
+<div>{{JSRef}}</div>
+
+<p>Il metodo <code><strong>concat()</strong></code> ritorna un nuovo array costituito dall'array sul quale è stato invocato (joined array) e dagli array e/o valori passati come argomenti.</p>
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox">var <var>new_array</var> = <var>old_array</var>.concat(<var>value1</var>[, <var>value2</var>[, ...[, <var>valueN</var>]]])</pre>
+
+<h3 id="Parametri">Parametri</h3>
+
+<dl>
+ <dt><code>value<em>N</em></code></dt>
+ <dd>Array e/o valori da concatenare nel nuovo array. Vedere la descrizione sotto per i dettagli.</dd>
+</dl>
+
+<h3 id="Valore_restituito">Valore restituito</h3>
+
+<p>Una nuova istanza di {{jsxref("Array")}}.</p>
+
+<h2 id="Descrizione">Descrizione</h2>
+
+<p>Il metodo <code>concat</code> crea un nuovo array costituito dagli elementi dell'oggetto su cui è stato invocato, seguiti in ordine da ciascun argomento o dagli elementi di ciascun argomento, se quest'ultimo è esso stesso un array.</p>
+
+<p>Il metodo <code>concat</code> non altera l'oggetto <code>this</code> (l'array originale) o gli elementi passati come parametri, ma ritorna una copia degli stessi che contiene copie degli elementi costituenti gli argomenti. Gli elementi degli array originali sono copiati in quello nuovo secondo le seguenti regole:</p>
+
+<ul>
+ <li>Riferimenti agli oggetti (non gli oggetti stessi): <code>concat</code> copia nel nuovo array i riferimenti agli oggetti. Sia gli elementi degli array originali che quelli dell'array prodotto da concat puntano agli stessi oggetti. Pertanto, se uno degli oggetti cui i riferimenti puntano viene cambiato, i cambiamenti possono essere visualizzati tramite i riferimenti contenuti nell'array originale o nella copia. Ciò include gli elementi degli argomenti di tipo array che fossero array a loro volta.</li>
+</ul>
+
+<pre class="brush: js">var a = [1, 2]
+var b = {c:1}
+var d = a.concat(b)
+
+// d[2] is {c: 1}
+b.c=10
+// d[2] is now {c: 10}
+</pre>
+
+<ul>
+ <li>Tipi di dati come stringhe, numeri e booleani (non oggetti {{jsxref("Global_Objects/String", "String")}}, {{jsxref("Global_Objects/Number", "Number")}}, e {{jsxref("Global_Objects/Boolean", "Boolean")}} ): <code>concat</code> li copia per valore nel nuovo array.</li>
+</ul>
+
+<div class="note">
+<p><strong>Note:</strong> Concatenando i valori di diversi array o valori, si lasciano gli originali inalterati. Inoltre, qualsiasi operazione sui nuovi array (eccetto le operazioni su elementi che siano riferimenti a oggetti) non avrà effetto alcuno sugli originali e viceversa.</p>
+</div>
+
+<h2 id="Esempi">Esempi</h2>
+
+<h3 id="Concatenare_due_array">Concatenare due array</h3>
+
+<h3 id="Il_codice_seguente_concatena_due_array"><span style="font-size: 14px;">Il codice seguente concatena due array:</span></h3>
+
+<pre class="brush: js">var alpha = ['a', 'b', 'c'];
+var numeric = [1, 2, 3];
+
+alpha.concat(numeric);
+// Risultato: ['a', 'b', 'c', 1, 2, 3]
+</pre>
+
+<h3 id="Concatenare_tre_array">Concatenare tre array</h3>
+
+<p>Il codice seguente concatena tre array:</p>
+
+<pre class="brush: js">var num1 = [1, 2, 3],
+ num2 = [4, 5, 6],
+ num3 = [7, 8, 9];
+
+var nums = num1.concat(num2, num3);
+
+
+console.log(nums);
+// Risultato: [1, 2, 3, 4, 5, 6, 7, 8, 9]
+</pre>
+
+<h3 id="Concatenare_valori_ad_un_array">Concatenare valori ad un array</h3>
+
+<p>Il codice seguente concatena dei valori a quelli presenti in un array:</p>
+
+<pre class="brush: js">var alpha = ['a', 'b', 'c'];
+
+var alphaNumeric = alpha.concat(1, [2, 3]);
+
+console.log(alphaNumeric);
+// Risultato: ['a', 'b', 'c', 1, 2, 3]
+</pre>
+
+<h2 id="Specifiche">Specifiche</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specifiche</th>
+ <th scope="col">Stato</th>
+ <th scope="col">Commento</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES3')}}</td>
+ <td>{{Spec2('ES3')}}</td>
+ <td>Definizione iniziale, implementato in JavaScript 1.2.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES5.1', '#sec-15.4.4.4', 'Array.prototype.concat')}}</td>
+ <td>{{Spec2('ES5.1')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-array.prototype.concat', 'Array.prototype.concat')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.prototype.concat', 'Array.prototype.concat')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilità_con_i_Browser">Compatibilità con i Browser</h2>
+
+<div>{{CompatibilityTable}}</div>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Browser</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Supporto Base</td>
+ <td>{{CompatChrome("1.0")}}</td>
+ <td>{{CompatGeckoDesktop("1.7")}}</td>
+ <td>{{CompatIE("5.5")}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Browser</th>
+ <th>Android</th>
+ <th>Chrome for Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Supporto Base</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="Vedere_anche">Vedere anche</h2>
+
+<ul>
+ <li>{{jsxref("Array.push", "push")}} / {{jsxref("Array.pop", "pop")}} — aggiunge/rimuove elementi dalla fine di un array</li>
+ <li>{{jsxref("Array.unshift", "unshift")}} / {{jsxref("Array.shift", "shift")}} — aggiunge/rimuove elementi dall'inizio di un array</li>
+ <li>{{jsxref("Array.splice", "splice")}} — aggiunge/rimuove elementi da una posizione specifica dell'array</li>
+ <li>{{jsxref("String.prototype.concat()")}}</li>
+ <li>{{jsxref("Symbol.isConcatSpreadable")}} – control flattening.</li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/copywithin/index.html b/files/it/web/javascript/reference/global_objects/array/copywithin/index.html
new file mode 100644
index 0000000000..65e00abe47
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/copywithin/index.html
@@ -0,0 +1,180 @@
+---
+title: Array.prototype.copyWithin()
+slug: Web/JavaScript/Reference/Global_Objects/Array/copyWithin
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/copyWithin
+---
+<div>{{JSRef}}</div>
+
+<p>Il metodo <code><strong>copyWithin()</strong></code> copia superficialmente una parte di un array in un'altra locazione dello stesso array e lo restituisce, senza modificare la sua dimensione.</p>
+
+<div>{{EmbedInteractiveExample("pages/js/array-copywithin.html")}}</div>
+
+<p class="hidden">Il codice sorgente di questo esempio interattivo e' reperibile in una repository di GitHub. Se sei interessato nel contribuire agli esempi interattivi, clona <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a> ed inviaci una pull request.</p>
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox"><var>arr</var>.copyWithin(<var>target</var>)
+<var>arr</var>.copyWithin(<var>target</var>, <var>start</var>)
+<var>arr</var>.copyWithin(<var>target</var>, <var>start</var>, <var>end</var>)
+</pre>
+
+<h3 id="Parametri">Parametri</h3>
+
+<dl>
+ <dt><code>target</code></dt>
+ <dd>Indice zero-based fino al quale copiare la sequenza. Se negativo, <code>target</code> sarà impostato all'ultimo elemento dell'array.</dd>
+ <dd>Se <code>target</code> è pari o più grande di <code>arr.length</code>, non sarà copiato nulla. Se <code>target</code> è posizionato dopo <code>start</code>, la sequenza copiata, sarà ritagliata per poter rientrare in <code>arr.length</code>.</dd>
+ <dt><code>start</code> {{optional_inline}}</dt>
+ <dd>Indice zero-based dal quale si comincia a copiare gli elementi. Se negativo, <code>start</code> comincerà a contare dalla fine.</dd>
+ <dd>Se <code>start</code> è omesso, <code>copyWithin</code> copierà dall'inizio (default 0).</dd>
+ <dt><code>end</code> {{optional_inline}}</dt>
+ <dd>Indice zero-based che indica l'ultimo indice dal quale copiare. <code>copyWithin</code> copia fino ad <code>end</code> ma non lo include. Se negativo, <code>end</code> sarà contato dalla fine.</dd>
+ <dd>Se <code>end</code> è omesso, <code>copyWithin</code> copierà fino alla fine (default <code>arr.length</code>).</dd>
+</dl>
+
+<h3 id="Valore_di_ritorno">Valore di ritorno</h3>
+
+<p>L'array modificato.</p>
+
+<h2 id="Descrizione">Descrizione</h2>
+
+<p><code>copyWithin</code> ha le stesse funzionalità di <code>memmove</code> provenienti da C e C++, ed è un metodo molto performante per spostare i dati di un {{jsxref("Array")}}. Questa modifica si applica specialmente a {{jsxref("TypedArray/copyWithin", "TypedArray")}} metodo con lo stesso nome. La sequenza è copiata e incollata come una singola operzione; la sequenza incollata avrà i valori copiati anche se essi si sovrappongono.</p>
+
+<p>La funzione <code>copyWithin</code> è intenzionalmente<em> generic</em>, e non richiede che i suoi argomenti siano {{jsxref("Array")}} object.</p>
+
+<p><code>copyWithin</code> è un metodo mutabile. Non altera la lunghezza di <code>this</code>, ma cambia il suo contenuto e crea nuove proprietà se necessario..</p>
+
+<h2 id="Esempi">Esempi</h2>
+
+<pre class="brush: js">[1, 2, 3, 4, 5].copyWithin(-2);
+// [1, 2, 3, 1, 2]
+
+[1, 2, 3, 4, 5].copyWithin(0, 3);
+// [4, 5, 3, 4, 5]
+
+[1, 2, 3, 4, 5].copyWithin(0, 3, 4);
+// [4, 2, 3, 4, 5]
+
+[1, 2, 3, 4, 5].copyWithin(-2, -3, -1);
+// [1, 2, 3, 3, 4]
+
+[].copyWithin.call({length: 5, 3: 1}, 0, 3);
+// {0: 1, 3: 1, length: 5}
+
+// ES2015 Typed Arrays are subclasses of Array
+var i32a = new Int32Array([1, 2, 3, 4, 5]);
+
+i32a.copyWithin(0, 2);
+// Int32Array [3, 4, 5, 4, 5]
+
+// On platforms that are not yet ES2015 compliant:
+[].copyWithin.call(new Int32Array([1, 2, 3, 4, 5]), 0, 3, 4);
+// Int32Array [4, 2, 3, 4, 5]
+</pre>
+
+<h2 id="Polyfill">Polyfill</h2>
+
+<pre><code>if (!Array.prototype.copyWithin) {
+ Array.prototype.copyWithin = function(target, start/*, end*/) {
+ // Steps 1-2.
+ if (this == null) {
+ throw new TypeError('this is null or not defined');
+ }
+
+ var O = Object(this);
+
+ // Steps 3-5.
+ var len = O.length &gt;&gt;&gt; 0;
+
+ // Steps 6-8.
+ var relativeTarget = target &gt;&gt; 0;
+
+ var to = relativeTarget &lt; 0 ?
+ Math.max(len + relativeTarget, 0) :
+ Math.min(relativeTarget, len);
+
+ // Steps 9-11.
+ var relativeStart = start &gt;&gt; 0;
+
+ var from = relativeStart &lt; 0 ?
+ Math.max(len + relativeStart, 0) :
+ Math.min(relativeStart, len);
+
+ // Steps 12-14.
+ var end = arguments[2];
+ var relativeEnd = end === undefined ? len : end &gt;&gt; 0;
+
+ var final = relativeEnd &lt; 0 ?
+ Math.max(len + relativeEnd, 0) :
+ Math.min(relativeEnd, len);
+
+ // Step 15.
+ var count = Math.min(final - from, len - to);
+
+ // Steps 16-17.
+ var direction = 1;
+
+ if (from &lt; to &amp;&amp; to &lt; (from + count)) {
+ direction = -1;
+ from += count - 1;
+ to += count - 1;
+ }
+</code>
+<code>    // Step 18.
+    while (count &gt; 0) {
+      if (from in O) {
+        O[to] = O[from];
+      } else {
+        delete O[to];
+      }
+
+      from += direction;
+      to += direction;
+      count--;
+    }
+
+    // Step 19.
+    return O;
+  };
+}</code></pre>
+
+<h2 id="Specificazioni">Specificazioni</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES2015', '#sec-array.prototype.copywithin', 'Array.prototype.copyWithin')}}</td>
+ <td>{{Spec2('ES2015')}}</td>
+ <td>Definizione iniziale.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES2016', '#sec-array.prototype.copywithin', 'Array.prototype.copyWithin')}}</td>
+ <td>{{Spec2('ES2016')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.prototype.copywithin', 'Array.prototype.copyWithin')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilità_browser">Compatibilità browser</h2>
+
+<div>
+<div class="hidden">La tabella di compatibilità in questa pagina è generata mediante dati strutturati. Se vuoi contribuire ai dati, controlla <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ed inviaci una pull request.</div>
+
+<p>{{Compat("javascript.builtins.Array.copyWithin")}}</p>
+</div>
+
+<h2 id="Vedi_anche">Vedi anche</h2>
+
+<ul>
+ <li>{{jsxref("Array")}}</li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/entries/index.html b/files/it/web/javascript/reference/global_objects/array/entries/index.html
new file mode 100644
index 0000000000..31e156afb8
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/entries/index.html
@@ -0,0 +1,77 @@
+---
+title: Array.prototype.entries()
+slug: Web/JavaScript/Reference/Global_Objects/Array/entries
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/entries
+---
+<div>{{JSRef}}</div>
+
+<p>Il metodo <code><strong>entries()</strong></code> restituisce un nuovo oggetto <code><strong>Array Iterator</strong></code> contenente delle coppie chiave/valore per ogni indice presente nell'array.</p>
+
+<div>{{EmbedInteractiveExample("pages/js/array-entries.html")}}</div>
+
+
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox"><var>a</var>.entries()</pre>
+
+<h3 id="Valore_ritornato">Valore ritornato</h3>
+
+<p>Un nuovo oggetto iterator {{jsxref("Array")}}.</p>
+
+<h2 id="Esempi">Esempi</h2>
+
+<h3 id="Utilizzo_nel_for…of">Utilizzo nel <a href="/en-US/docs/Web/JavaScript/Reference/Statements/for...of">for…of</a></h3>
+
+<pre class="brush:js">var a = ['a', 'b', 'c'];
+var iterator = a.entries();
+
+for (let e of iterator) {
+ console.log(e);
+}
+// [0, 'a']
+// [1, 'b']
+// [2, 'c']
+</pre>
+
+<h2 id="Specifiche">Specifiche</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specifica</th>
+ <th scope="col">Stato</th>
+ <th scope="col">Commento</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES2015', '#sec-array.prototype.entries', 'Array.prototype.entries')}}</td>
+ <td>{{Spec2('ES2015')}}</td>
+ <td>Definizione iniziale.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.prototype.entries', 'Array.prototype.entries')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilità_con_il_browser">Compatibilità con il browser</h2>
+
+<div>
+
+
+<p>{{Compat("javascript.builtins.Array.entries")}}</p>
+</div>
+
+<h2 id="Vedi_anche">Vedi anche</h2>
+
+<ul>
+ <li>{{jsxref("Array.prototype.keys()")}}</li>
+ <li>{{jsxref("Array.prototype.values()")}}</li>
+ <li>{{jsxref("Array.prototype.forEach()")}}</li>
+ <li>{{jsxref("Array.prototype.every()")}}</li>
+ <li>{{jsxref("Array.prototype.some()")}}</li>
+ <li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/for...of">for...of</a></li>
+ <li><a href="/en-US/docs/Web/JavaScript/Reference/Iteration_protocols">Iteration protocols</a></li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/every/index.html b/files/it/web/javascript/reference/global_objects/array/every/index.html
new file mode 100644
index 0000000000..c1f3238ad6
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/every/index.html
@@ -0,0 +1,184 @@
+---
+title: Array.prototype.every()
+slug: Web/JavaScript/Reference/Global_Objects/Array/every
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/every
+---
+<div>{{JSRef}}</div>
+
+<p>Il metodo <code><strong>every()</strong></code> controlla che tutti gli elementi all'interno dell'array passino il test implementato dalla funzione fornita.</p>
+
+<div>{{EmbedInteractiveExample("pages/js/array-every.html")}}</div>
+
+<p class="hidden">Il codice sorgente per questo esempio interattivo è salvato all'interno di una repository GitHub. Se vuoi contribuire al progetto sugli esempi interattivi, perfavore clona <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a> e mandaci una pull request.</p>
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox"><var>arr</var>.every(<var>callback</var>[, <var>thisArg</var>])</pre>
+
+<h3 id="Parametri">Parametri</h3>
+
+<dl>
+ <dt><code>callback</code></dt>
+ <dd>Funzione da testare per ciascun elemento, che prende tre argomenti:
+ <dl>
+ <dt><code>currentValue</code> (required)</dt>
+ <dd>L'elemento corrente che viene elaborato all'interno dell'array.</dd>
+ <dt><code>index</code>{{Optional_inline}}</dt>
+ <dd>L'indice dell'elemento corrente che viene elaborato all'interno dell'array.</dd>
+ <dt><code>array</code>{{Optional_inline}}</dt>
+ <dd>L'array <code>every</code> chiamato.</dd>
+ </dl>
+ </dd>
+ <dt><code>thisArg</code>{{Optional_inline}}</dt>
+ <dd>Opzionale. Valore da utilizzare come <code>this</code> durante l'esecuzione della <code>callback</code>.</dd>
+</dl>
+
+<h3 id="Valore_di_ritorno">Valore di ritorno</h3>
+
+<p><code><strong>true</strong></code> se la funzione callback ritorna un valore {{Glossary("truthy")}} per ciascun elemento dell'array; altrimenti, <code><strong>false</strong></code>.</p>
+
+<h2 id="Descrizione">Descrizione</h2>
+
+<p>Il metodo <code>every</code>  esegue la funzione <code>callback</code> fornita una volta per ciascun elemento presente all'interno dell'array finché non ne trova uno per il quale la <code>callback</code> ritorna un valore {{Glossary("falsy")}}. Altrimenti, se la <code>callback</code> ritorna un valore {{Glossary("truthy")}} per tutti gli elementi, <code>every</code> ritorna <code>true</code>. <code>callback</code> viene invocata solo per gli indici dell'array che hanno un valore assegnato; non viene invocata per gli indici che sono stati eliminati o ai quali non è mai stato assegnato un valore.</p>
+
+<p><code>callback</code> viene invocata con tre argomenti: il valore dell'elemento, l'indice dell'elemento, e l'Array oggetto che viene attraversato. </p>
+
+<p>Se il parametro <code>thisArg</code> viene fornito a <code>every</code>, esso verrà usato come valore <code>this</code> per la <code>callback</code>. Altrimenti, il valore <code>undefined</code> verrà usato al suo posto come valore <code>this</code>.  Il valore <code>this</code>, ultimo osservabile dalla <code>callback</code>, viene determinato secondo <a href="/en-US/docs/Web/JavaScript/Reference/Operators/this">le usuali regole per determinare il this visto da una funzione.</a></p>
+
+<p><code>every</code> non modifica l'array in cui viene chiamato.</p>
+
+<p>Il range di elementi processati da <code>every</code> viene impostato prima della prima invocazione di <code>callback</code>. Gli elementi che vengono appesi all'inizio dell'array dopo la chiamata a <code>every</code>  non verranno visitati dalla <code>callback</code>. Se gli elementi esistenti dell'array vengono cambiati, il loro valore passato a <code>callback</code> sarà il valore al momento in cui <code>every</code> li visiterà; gli elementi cancellati non sono visitati.</p>
+
+<p><code>every</code> agisce come il quantificatore "for all" in matematica. In particolare, per un array vuoto, esso ritorna true. (E' <a href="http://en.wikipedia.org/wiki/Vacuous_truth#Vacuous_truths_in_mathematics">vacuously true</a> che tutti gli elementi dell' <a href="http://en.wikipedia.org/wiki/Empty_set#Common_problems">empty set</a> soddisfano qualsiasi condizione data.)</p>
+
+<h2 id="Esempi">Esempi</h2>
+
+<h3 id="Controllo_sulla_grandezza_di_tutti_gli_elementi_dell'array">Controllo sulla grandezza di tutti gli elementi dell'array</h3>
+
+<p>Il seguente esempio controlla che tutti gli elementi dell'array siano maggiori di 10.</p>
+
+<pre class="brush: js">function isBigEnough(element, index, array) {
+ return element &gt;= 10;
+}
+[12, 5, 8, 130, 44].every(isBigEnough); // false
+[12, 54, 18, 130, 44].every(isBigEnough); // true
+</pre>
+
+<h3 id="Utilizzando_arrow_functions">Utilizzando arrow functions</h3>
+
+<p><a href="/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions">Arrow functions</a> forniscono una sintassi più breve per lo stesso test.</p>
+
+<pre class="brush: js">[12, 5, 8, 130, 44].every(x =&gt; x &gt;= 10); // false
+[12, 54, 18, 130, 44].every(x =&gt; x &gt;= 10); // true</pre>
+
+<h2 id="Polyfill">Polyfill</h2>
+
+<p><code>every</code> è stato aggiunto allo standard ECMA-262 nella 5a edizione; per questo motivo potrebbe non essere presente in altre implementazioni dello standard. Potrai aggirare il problema inserendo il seguente codice all'inizio dei tuoi scripts, permettendo così l'utilizzo di <code>every</code> in implementazioni che non lo supportano nativamente. Questo algoritmo è esattamente quello specificato in ECMA-262, 5a edizione, assumendo che <code>Object</code> e <code>TypeError</code> abbiano i loro valori originali e che <code>callbackfn.call</code> valuti sul valore originale di {{jsxref("Function.prototype.call")}}.</p>
+
+<pre class="brush: js">if (!Array.prototype.every) {
+ Array.prototype.every = function(callbackfn, thisArg) {
+ 'use strict';
+ var T, k;
+
+ if (this == null) {
+ throw new TypeError('this is null or not defined');
+ }
+
+ // 1. Let O be the result of calling ToObject passing the this
+ // value as the argument.
+ var O = Object(this);
+
+ // 2. Let lenValue be the result of calling the Get internal method
+ // of O with the argument "length".
+ // 3. Let len be ToUint32(lenValue).
+ var len = O.length &gt;&gt;&gt; 0;
+
+ // 4. If IsCallable(callbackfn) is false, throw a TypeError exception.
+ if (typeof callbackfn !== 'function') {
+ throw new TypeError();
+ }
+
+ // 5. If thisArg was supplied, let T be thisArg; else let T be undefined.
+ if (arguments.length &gt; 1) {
+ T = thisArg;
+ }
+
+ // 6. Let k be 0.
+ k = 0;
+
+ // 7. Repeat, while k &lt; len
+ while (k &lt; len) {
+
+ var kValue;
+
+ // a. Let Pk be ToString(k).
+ // This is implicit for LHS operands of the in operator
+ // b. Let kPresent be the result of calling the HasProperty internal
+ // method of O with argument Pk.
+ // This step can be combined with c
+ // c. If kPresent is true, then
+ if (k in O) {
+
+ // i. Let kValue be the result of calling the Get internal method
+ // of O with argument Pk.
+ kValue = O[k];
+
+ // ii. Let testResult be the result of calling the Call internal method
+ // of callbackfn with T as the this value and argument list
+ // containing kValue, k, and O.
+ var testResult = callbackfn.call(T, kValue, k, O);
+
+ // iii. If ToBoolean(testResult) is false, return false.
+ if (!testResult) {
+ return false;
+ }
+ }
+ k++;
+ }
+ return true;
+ };
+}
+</pre>
+
+<h2 id="Specifiche">Specifiche</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specifica</th>
+ <th scope="col">Stato</th>
+ <th scope="col">Commento</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES5.1', '#sec-15.4.4.16', 'Array.prototype.every')}}</td>
+ <td>{{Spec2('ES5.1')}}</td>
+ <td>Definizione iniziale. Implementata in JavaScript 1.6.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-array.prototype.every', 'Array.prototype.every')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.prototype.every', 'Array.prototype.every')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilità_browser">Compatibilità browser</h2>
+
+<div>
+
+
+<p>{{Compat("javascript.builtins.Array.every")}}</p>
+</div>
+
+<h2 id="Vedere_anche">Vedere anche</h2>
+
+<ul>
+ <li>{{jsxref("Array.prototype.forEach()")}}</li>
+ <li>{{jsxref("Array.prototype.some()")}}</li>
+ <li>{{jsxref("TypedArray.prototype.every()")}}</li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/fill/index.html b/files/it/web/javascript/reference/global_objects/array/fill/index.html
new file mode 100644
index 0000000000..043696f554
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/fill/index.html
@@ -0,0 +1,155 @@
+---
+title: Array.prototype.fill()
+slug: Web/JavaScript/Reference/Global_Objects/Array/fill
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/fill
+---
+<div>{{JSRef}}</div>
+
+<p>Il metodo <code><strong>fill()</strong></code> assegna un valore statico a tutti gli elementi di un array compresi tra un indice iniziale ed un indice finale.</p>
+
+<pre class="brush: js">var numbers = [1, 2, 3]
+numbers.fill(1);
+
+// results in [1, 1, 1]</pre>
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox"><var>arr</var>.fill(<var>value</var><var><var>)</var></var>
+<var>arr</var>.fill(<var>value</var>, <var>start<var>)
+</var>arr</var>.fill(<var>value</var>, <var>start<var>, <var>end</var>)</var></var>
+</pre>
+
+<h3 id="Parametri">Parametri</h3>
+
+<dl>
+ <dt><code>value</code></dt>
+ <dd>Valore statico da assegnare agli elementi dell'array.</dd>
+ <dt><code>start</code> {{optional_inline}}</dt>
+ <dd>Indice iniziale, default uguale a 0.</dd>
+ <dt><code>end</code> {{optional_inline}}</dt>
+ <dd>Indice finale, default uguale a <code>this.length</code>.</dd>
+</dl>
+
+<h3 id="Valore_di_ritorno">Valore di ritorno</h3>
+
+<p>L'array modificato.</p>
+
+<h2 id="Descrizione">Descrizione</h2>
+
+<p>L'intervallo di elementi da assegnare è compreso tra [<code>start</code>, <code>end</code>).</p>
+
+<p>Il metodo  <strong><code>fill</code></strong> accetta fino a tre argomenti: <code>value</code>, <code>start</code> and <code>end</code>. Gli argomenti <code>start</code> e <code>end</code>  sono opzionali con valori di default rispettivamente di <code>0</code> di <code>length</code> dell'oggetto <code>this</code> .</p>
+
+<p>Se <code>start</code> è negativo, viene interpretato come <code>length+start</code> dove <code>length</code> è la lunghezza dell'array. Se <code>end</code> è negativo, viene intrpretato come <code>length+end</code>.</p>
+
+<p>La funzione <strong><code>fill</code></strong> è volutamente generica, non richiede che il suo valore <code>this</code> sia un Array.</p>
+
+<p>Il metodo <strong><code>fill</code></strong> è mutabile, ovvero modifica l'oggetto <code>this</code>  e  lo restituisce modificato, ovvero non ne restituisce una copia modificata.</p>
+
+<p>Quando al metodo <strong><code>fill</code></strong> viene passato un oggetto, il metodo effettuerà una copia dell'oggetto e  assegnerà agli elementi dell'Array un riferimento alla copia.</p>
+
+<h2 id="Examples">Examples</h2>
+
+<pre class="brush: js">[1, 2, 3].fill(4); // [4, 4, 4]
+[1, 2, 3].fill(4, 1); // [1, 4, 4]
+[1, 2, 3].fill(4, 1, 2); // [1, 4, 3]
+[1, 2, 3].fill(4, 1, 1); // [1, 2, 3]
+[1, 2, 3].fill(4, 3, 3); // [1, 2, 3]
+[1, 2, 3].fill(4, 3, 3); // [1, 2, 3]
+[1, 2, 3].fill(4, -3, -2); // [4, 2, 3]
+[1, 2, 3].fill(4, NaN, NaN); // [1, 2, 3]
+[1, 2, 3].fill(4, 3, 5); // [1, 2, 3]
+Array(3).fill(4); // [4, 4, 4]
+[].fill.call({ length: 3 }, 4); // {0: 4, 1: 4, 2: 4, length: 3}
+
+// Objects by reference.
+var arr = Array(3).fill({}) // [{}, {}, {}];
+arr[0].hi = "hi"; // [{ hi: "hi" }, { hi: "hi" }, { hi: "hi" }]
+</pre>
+
+<h2 id="Polyfill">Polyfill</h2>
+
+<pre class="brush: js">if (!Array.prototype.fill) {
+ Object.defineProperty(Array.prototype, 'fill', {
+ value: function(value) {
+
+ // Steps 1-2.
+ if (this == null) {
+ throw new TypeError('this is null or not defined');
+ }
+
+ var O = Object(this);
+
+ // Steps 3-5.
+ var len = O.length &gt;&gt;&gt; 0;
+
+ // Steps 6-7.
+ var start = arguments[1];
+ var relativeStart = start &gt;&gt; 0;
+
+ // Step 8.
+ var k = relativeStart &lt; 0 ?
+ Math.max(len + relativeStart, 0) :
+ Math.min(relativeStart, len);
+
+ // Steps 9-10.
+ var end = arguments[2];
+ var relativeEnd = end === undefined ?
+ len : end &gt;&gt; 0;
+
+ // Step 11.
+ var final = relativeEnd &lt; 0 ?
+ Math.max(len + relativeEnd, 0) :
+ Math.min(relativeEnd, len);
+
+ // Step 12.
+ while (k &lt; final) {
+ O[k] = value;
+ k++;
+ }
+
+ // Step 13.
+ return O;
+ }
+ });
+}
+</pre>
+
+<p>Se hai necessità di supportare engine Javascript veramente obsolete che non supportano <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty">Object.defineProperty</a></code>, è meglio non usare affatto il polyfill per il medoto <code>Array.prototype</code> perchè non è possibile renderlo non enumerabile.</p>
+
+<h2 id="Specifiche">Specifiche</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specifica</th>
+ <th scope="col">Stato</th>
+ <th scope="col">Commenti</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES2015', '#sec-array.prototype.fill', 'Array.prototype.fill')}}</td>
+ <td>{{Spec2('ES2015')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.prototype.fill', 'Array.prototype.fill')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+<div>
+
+
+<p>{{Compat("javascript.builtins.Array.fill")}}</p>
+</div>
+
+<h2 id="Vedi_anche">Vedi anche</h2>
+
+<ul>
+ <li>{{jsxref("Array")}}</li>
+ <li>{{jsxref("TypedArray.prototype.fill()")}}</li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/filter/index.html b/files/it/web/javascript/reference/global_objects/array/filter/index.html
new file mode 100644
index 0000000000..33d24d38b6
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/filter/index.html
@@ -0,0 +1,245 @@
+---
+title: Array.prototype.filter()
+slug: Web/JavaScript/Reference/Global_Objects/Array/filter
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/filter
+---
+<div>{{JSRef}}</div>
+
+<p>Il metodo <code><strong>filter() </strong></code>crea un nuovo array contentente tutti gli elementi che passano il test implementato dalla funzione. </p>
+
+<pre class="brush: js">function isBigEnough(value) {
+ return value &gt;= 10;
+}
+
+var filtered = [12, 5, 8, 130, 44].filter(isBigEnough);
+// filtered is [12, 130, 44]
+</pre>
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox"><var>var new_array = arr</var>.filter(<var>callback</var>[, <var>thisArg</var>])</pre>
+
+<h3 id="Parametri">Parametri</h3>
+
+<dl>
+ <dt><code>callback</code></dt>
+ <dd>Funzione predicato per testare ciascun elemento dell'array. Restituisce <code>true</code> se l'elemento va mantenuto, <code>false</code> altrimenti. Essa prende in input tre argomenti:</dd>
+ <dd>
+ <dl>
+ <dt><code>element</code></dt>
+ <dd>L'elemento corrente nell'array processato.</dd>
+ <dt><code>index</code></dt>
+ <dd>L' indice dell'elemento corrente processato nell'array.</dd>
+ <dt><code>array</code></dt>
+ <dd>l'array su cui <code>filter</code> è stato chiamato.</dd>
+ </dl>
+ </dd>
+ <dt><code>thisArg</code></dt>
+ <dd>Opzionale. Valore da usare come <code>this</code> quando si esegue <code>callback</code>.</dd>
+</dl>
+
+<h3 id="Valore_restituito">Valore restituito</h3>
+
+<p>Un nuovo array con gli elementi che hanno passato il test.</p>
+
+<h2 id="Descrizione">Descrizione</h2>
+
+<p><code>filter()</code> chiama funzione ricorsiva (<code>callback</code>) fornita una volta per ciascun elemento dell'array e crea un nuovo array con tutti quei valori in cui la <code>callback</code> ha restituito un valore<a href="/en-US/docs/Glossary/Truthy"> <code>true</code></a>.. <code>callback</code> viene invocata solo per gli indici dell'array a cui sono associati dei valori; non viene invocata per inidici in cui sono stati cancellati i valori o in cui non sono stati definiti valori. Gli elementi dell'array che non superano il test vengono semplicemente ignorati, non venendo così inseriti nel nuovo array.</p>
+
+<p><code>callback</code> viene invocata con tre argomenti:</p>
+
+<ol>
+ <li>il valore dell'elemento</li>
+ <li>l'indice dell'elemento</li>
+ <li>l' Array oggetto da passare</li>
+</ol>
+
+<p>Se viene fornito a <code>filter</code> un parametro <code>thisArg</code> , questo verrà passato a sua volta a <code>callback</code> quando verrà invocata per usarlo come valore di <code>this</code> . Altrimenti verrà passato un valore <code>undefined</code> per essere usato come valore di <code>this</code>. Il valore  <code>this</code> osservabile in definitiva dalla funzione <code>callback</code> viene scelto seguendo <a href="/en-US/docs/Web/JavaScript/Reference/Operators/this">le usuali regole di determinazione dei <code>this </code>visti da una funzione</a>.</p>
+
+<p><code>filter()</code> non muta l'array sul quale viene chiamata.</p>
+
+<p>La gamma di element processati da <code>filter()</code> viene impostata prima della invocazione della <code>callback</code>. Gli elementi che vengono mesi nell'array da filtrare dopo l'invocazione di <code>filter()</code> non verranno esaminati dalla <code>callback</code>. Se ci sono elementi dell'array da fitrare i cui valori vengono cambiati o vengono cancellati dopo la applicazione di <code>filter()</code> ,  questi nel tempo di chamata di <code>filter()</code> verranno testati dalla  <code>callback</code> nello stato previo alla loro modifica. Elementi cancellati prima della applicazione di  <code>filter()</code>  non vengono visitati.</p>
+
+<h2 id="Esempi">Esempi</h2>
+
+<h3 id="Filtrare_tutti_i_piccoli_valori">Filtrare tutti i piccoli valori</h3>
+
+<p>Il seguente esempio usa <code>filter()</code> per realizzare un array filtrato che non contenga elementi di valore inferiore a 10.</p>
+
+<pre class="brush: js">function isBigEnough(value) {
+ return value &gt;= 10;
+}
+
+var filtered = [12, 5, 8, 130, 44].filter(isBigEnough);
+// filtered is [12, 130, 44]
+</pre>
+
+<h3 id="Filtrare_entrate_non_valide_in_JSON">Filtrare entrate non valide in JSON</h3>
+
+<p>Il sequente esempio di utilizzo di <code>filter()</code> crea un json filtrato di elementi con valido  id numerico.</p>
+
+<pre class="brush: js">var arr = [
+ { id: 15 },
+ { id: -1 },
+ { id: 0 },
+ { id: 3 },
+ { id: 12.2 },
+ { },
+ { id: null },
+ { id: NaN },
+ { id: 'undefined' }
+];
+
+var invalidEntries = 0;
+
+function isNumber(obj) {
+ return obj!== undefined &amp;&amp; typeof(obj) === 'number' &amp;&amp; !isNaN(obj);
+}
+
+function filterByID(item) {
+ if (isNumber(item.id)) {
+ return true;
+ }
+ invalidEntries++;
+ return false;
+}
+
+var arrByID = arr.filter(filterByID);
+
+console.log('Filtered Array\n', arrByID);
+// Array filtrato
+// [{ id: 15 }, { id: -1 }, { id: 0 }, { id: 3 }, { id: 12.2 }]
+
+console.log('Quantità di entrate non valide = ', invalidEntries);
+// Quantità di entrate non valide = 4
+</pre>
+
+<h2 id="Polyfill">Polyfill</h2>
+
+<p><code>filter()</code> è stato aggiunto allo standard ECMA-262 nella quinta edizione; potrebbe essere non presente in tutte le implementazioni dello standard. Puoi sempre inserire il seguente codice nei tuoi script per poter usare <code>filter()</code> nelle implementazioni ECMA-262 che non lo supportanto nativamente. Questo algoritmo è esattamente quello nella specifica ECMA-262, quinta edizione, assumendo che  <code>fn.call</code> valuti il valore originale di  {{jsxref("Function.prototype.call()")}},e che {{jsxref("Array.prototype.push()")}} abbia il suo valore originale.</p>
+
+<pre class="brush: js">if (!Array.prototype.filter) {
+ Array.prototype.filter = function(fun/*, thisArg*/) {
+ 'use strict';
+
+ if (this === void 0 || this === null) {
+ throw new TypeError();
+ }
+
+ var t = Object(this);
+ var len = t.length &gt;&gt;&gt; 0;
+ if (typeof fun !== 'function') {
+ throw new TypeError();
+ }
+
+ var res = [];
+ var thisArg = arguments.length &gt;= 2 ? arguments[1] : void 0;
+ for (var i = 0; i &lt; len; i++) {
+ if (i in t) {
+ var val = t[i];
+
+ // NOTE: Technically this should Object.defineProperty at
+ // the next index, as push can be affected by
+ // properties on Object.prototype and Array.prototype.
+ // But that method's new, and collisions should be
+ // rare, so use the more-compatible alternative.
+ if (fun.call(thisArg, val, i, t)) {
+ res.push(val);
+ }
+ }
+ }
+
+ return res;
+ };
+}
+</pre>
+
+<h2 id="Specificazioni">Specificazioni</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES5.1', '#sec-15.4.4.20', 'Array.prototype.filter')}}</td>
+ <td>{{Spec2('ES5.1')}}</td>
+ <td>
+ <p>Definizione iniziale. Implementato in javascript 1.6.</p>
+ </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-array.prototype.filter', 'Array.prototype.filter')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.prototype.filter', 'Array.prototype.filter')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilità_Browser">Compatibilità Browser</h2>
+
+<div>{{CompatibilityTable}}</div>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatGeckoDesktop("1.8")}}</td>
+ <td>{{CompatIE("9")}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android</th>
+ <th>Chrome for Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatGeckoMobile("1.8")}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="Vedi_anche">Vedi anche</h2>
+
+<ul>
+ <li>{{jsxref("Array.prototype.forEach()")}}</li>
+ <li>{{jsxref("Array.prototype.every()")}}</li>
+ <li>{{jsxref("Array.prototype.some()")}}</li>
+ <li>{{jsxref("Array.prototype.reduce()")}}</li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/find/index.html b/files/it/web/javascript/reference/global_objects/array/find/index.html
new file mode 100644
index 0000000000..c215ff79e7
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/find/index.html
@@ -0,0 +1,216 @@
+---
+title: Array.prototype.find()
+slug: Web/JavaScript/Reference/Global_Objects/Array/find
+tags:
+ - Array
+ - ECMAScript 2015
+ - ECMAScript6
+ - JavaScript
+ - Prototype
+ - Riferimento
+ - metodo
+ - polyfill
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/find
+---
+<div>{{JSRef}}</div>
+
+<p>Il metodo <code><strong>find()</strong></code> restituisce il <strong>valore</strong> del primo elemento nell'array che soddisfi la funzione di test passata come argomento. Altrimenti viene restituito {{jsxref("undefined")}}.</p>
+
+<pre class="brush: js">function isBigEnough(element) {
+ return element &gt;= 15;
+}
+
+[12, 5, 8, 130, 44].find(isBigEnough); // 130</pre>
+
+<p>Vedi anche il metodo {{jsxref("Array.findIndex", "findIndex()")}}, che restituisce l'<strong>indice</strong> dell'elemento trovato nell'array invece del suo valore.</p>
+
+<p>Se hai bisogno di trovare la posizione di un elemento o determinare se un elemento esiste o meno nell'array, puoi usare i metodi {{jsxref("Array.prototype.indexOf()")}} o {{jsxref("Array.prototype.includes()")}}.</p>
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox"><var>arr</var>.find(<var>callback</var>[, <var>thisArg</var>])</pre>
+
+<h3 id="Parametri">Parametri</h3>
+
+<dl>
+ <dt><code>callback</code></dt>
+ <dd>Funzione da eseguire per ogni valore contenuto nell'array, richiede tre argomenti:
+ <dl>
+ <dt><code>element</code></dt>
+ <dd>L'elemento nell'array che dev'essere testato.</dd>
+ <dt><code>index</code></dt>
+ <dd>L'indice dell'elemento nell'array che dev'essere testato.</dd>
+ <dt><code>array</code></dt>
+ <dd>L'array sul quale è stato chiamato il <code>find</code>.</dd>
+ </dl>
+ </dd>
+ <dt><code>thisArg</code></dt>
+ <dd>Opzionale. L'oggetto da utilizzare come <code>this</code> durante l'esecuzione della <code>callback</code>.</dd>
+</dl>
+
+<h3 id="Valore_restituito">Valore restituito</h3>
+
+<p>Un valore dell'array se un elemento soddisfa la condizione; altrimenti, {{jsxref("undefined")}}.</p>
+
+<h2 id="Descrizione">Descrizione</h2>
+
+<p>Il metodo <code>find</code> esegue la funzione di <code>callback</code> una sola volta per ciascun elemento nell'array finché non ne trova uno per il quale la funzione di <code>callback</code> restituisca <code>true</code>. Se tale elemento viene trovato, <code>find</code> restituisce immediatamente il valore di quell'elemento. Altrimenti, <code>find</code> restituisce {{jsxref("undefined")}}. La funzione <code>callback</code> è invocata solo per quegli indici dell'array per i quali esiste un valore; non viene invocata per quegli indici che sono stati cancellati o ai quali non è mai stato assegnato alcun valore.</p>
+
+<p>Alla funzione <code>callback</code> vengono passati tre parametri: il valore dell'elemento, l'indice dell'elemento e l'oggetto Array che si sta esplorando.</p>
+
+<p>Se viene passato il parametro <code>thisArg</code> al metodo <code>find</code>, questo verrà usato come <code>this</code> per ciascuna invocazione della funzione <code>callback</code>. Altrimenti viene utilizzato {{jsxref("undefined")}}.</p>
+
+<p>Il metodo <code>find</code> non modifica l'array sul quale viene chiamato.</p>
+
+<p>L'intervallo di elementi analizzati dal metodo <code>find</code> è impostato prima della prima invocazione della <code>callback</code>. Gli elementi aggiunti all'array successivamente alla chiamata del metodo <code>find</code> non verranno analizzate dalla <code>callback</code>. Se un elemento dell'array esistente, ma non ancora visitato, viene modificato dalla <code>callback</code>, il valore passato alla funzione <code>callback</code> sarà il valore contenuto nel momento in cui il metodo <code>find</code> visita l'indice di quell'elemento; gli elementi eliminati non vengono visitati.</p>
+
+<h2 id="Esempi">Esempi</h2>
+
+<h3 id="Trova_un_oggetto_in_un_array_tramite_una_sua_proprietà">Trova un oggetto in un array tramite una sua proprietà</h3>
+
+<pre class="brush: js">var inventario = [
+ {name: 'mele', quantity: 2},
+ {name: 'banane', quantity: 0},
+ {name: 'ciliegie', quantity: 5}
+];
+
+function findCherries(fruit) {
+ return fruit.name === 'ciliegie';
+}
+
+console.log(inventario.find(findCherries));
+// { name: 'ciliegie', quantity: 5 }</pre>
+
+<h3 id="Trova_un_numero_primo_in_un_array">Trova un numero primo in un array</h3>
+
+<p>L'esempio seguente trova un elemento nell'array che sia un numero primo (o restituisce {{jsxref("undefined")}} se non ce ne sono).</p>
+
+<pre class="brush: js">function isPrime(element, index, array) {
+ var start = 2;
+ while (start &lt;= Math.sqrt(element)) {
+ if (element % start++ &lt; 1) {
+ return false;
+ }
+ }
+ return element &gt; 1;
+}
+
+console.log([4, 6, 8, 12].find(isPrime)); // undefined, non trovato
+console.log([4, 5, 8, 12].find(isPrime)); // 5
+</pre>
+
+<h2 id="Polyfill">Polyfill</h2>
+
+<p>Questo metodo è stato aggiunto nella specifica ECMAScript 2015 e potrebbe non ancora essere disponibile in tutte le implementazioni JavaScript. Comunque, puoi aggiungere il metodo <code>Array.prototype.find()</code> utilizzando il seguente snippet:</p>
+
+<pre class="brush: js">if (!Array.prototype.find) {
+ Object.defineProperty(Array.prototype, 'find', {
+  value: function(predicate) {
+ 'use strict';
+ if (this == null) {
+ throw new TypeError('Array.prototype.find called on null or undefined');
+ }
+ if (typeof predicate !== 'function') {
+ throw new TypeError('predicate must be a function');
+ }
+ var list = Object(this);
+ var length = list.length &gt;&gt;&gt; 0;
+ var thisArg = arguments[1];
+
+ for (var i = 0; i !== length; i++) {
+ if (predicate.call(thisArg, this[i], i, list)) {
+ return this[i];
+ }
+ }
+ return undefined;
+ }
+ });
+}
+</pre>
+
+<p>Se hai la necessità di supportare motori JavaScript molto obsoleti che non supportano <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty">Object.defineProperty</a></code>, sarebbe meglio non aggiungere per niente il metodo  <code>Array.prototype.find()</code>, poiché potresti renderli non-enumerabili.</p>
+
+<h2 id="Specifiche">Specifiche</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specifica</th>
+ <th scope="col">Stato</th>
+ <th scope="col">Commento</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-array.prototype.find', 'Array.prototype.find')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.prototype.find', 'Array.prototype.find')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilità_browser">Compatibilità browser</h2>
+
+<div>{{CompatibilityTable}}</div>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Edge</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatChrome(45.0)}}</td>
+ <td>{{CompatGeckoDesktop("25.0")}}</td>
+ <td>{{CompatNo}}</td>
+ <td>12</td>
+ <td>{{CompatOpera(32.0)}}</td>
+ <td>{{CompatSafari("7.1")}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android</th>
+ <th>Chrome for Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Edge</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatGeckoMobile("25.0")}}</td>
+ <td>{{CompatNo}}</td>
+ <td>12</td>
+ <td>{{CompatNo}}</td>
+ <td>8.0</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="Vedi_anche">Vedi anche</h2>
+
+<ul>
+ <li>{{jsxref("Array.prototype.findIndex()")}}</li>
+ <li>{{jsxref("Array.prototype.every()")}}</li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/findindex/index.html b/files/it/web/javascript/reference/global_objects/array/findindex/index.html
new file mode 100644
index 0000000000..f9f2f65791
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/findindex/index.html
@@ -0,0 +1,182 @@
+---
+title: Array.prototype.findIndex()
+slug: Web/JavaScript/Reference/Global_Objects/Array/findIndex
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/findIndex
+---
+<div>{{JSRef}}</div>
+
+<p><span class="seoSummary">Il metodo <code><strong>findIndex()</strong></code> restituisce l'<strong>indice</strong> del primo elemento nell'array <strong>che soddisfa la funzione di testing fornita</strong>. Altrimenti, restituisce <code>-1</code>, indicando che nessun elemento ha superato il test.</span></p>
+
+<div>{{EmbedInteractiveExample("pages/js/array-findindex.html","shorter")}}</div>
+
+<div class="hidden">Il sorgente di questo esempio interattivo è salvato una repository GitHub. Se volessi contribuire al progetto degli esempi interattivi, clona <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a> and inviaci una pull request.</div>
+
+<p>Guarda anche il metodo {{jsxref("Array.find", "find()")}}, che restituisce il <strong>valore</strong> dell'elemento anziché il suo indice.</p>
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox notranslate"><var>arr</var>.findIndex(<var>callback</var>( <var>elemento</var>[,<em>indice</em>[, <var>array</var>]] )[, <var>thisArg</var>])
+</pre>
+
+<h3 id="Parametri">Parametri</h3>
+
+<dl>
+ <dt><code><var>callback</var></code></dt>
+ <dd>
+ <p>Una funzione da eseguire su ognuno dei valori finché la funzione non resitituisce <code>true</code>, indicando che l'elemento che soddisfa la condizione è stato trovato.</p>
+
+ <p>Prende in input tre argomenti:</p>
+
+ <dl>
+ <dt><code><var>elemento</var></code></dt>
+ <dd>L'elemento dell'array che viene processato.</dd>
+ <dt><code><var>indice</var></code> {{optional_inline}}</dt>
+ <dd>L'indice dell'elemento dell'array che viene processato.</dd>
+ <dt><code><var>array</var></code> {{optional_inline}}</dt>
+ <dd>L'array su cui è stato chiamato <code>findIndex()</code>.</dd>
+ </dl>
+ </dd>
+ <dt><code><var>thisArg</var></code> {{optional_inline}}</dt>
+ <dd>Oggetto da usare come <code>this</code> quando viene eseguita la <code><var>callback</var></code>.</dd>
+</dl>
+
+<h3 id="Valore_restituito">Valore restituito</h3>
+
+<p>L'indice dell primo elemento dell'array che supera il test. Altrimenti <code>-1</code>.</p>
+
+<h2 id="Descrizione">Descrizione</h2>
+
+<p><code><font face="Arial, x-locale-body, sans-serif"><span style="background-color: #ffffff;">Il metodo </span></font>findIndex()</code> esegue la <code><var>callback</var></code> una volta per ogni indice nell'array finché non trova quello per cui la <code><var>callback</var></code> ritorna un valore {{Glossary("truthy")}}.</p>
+
+<p>Se l'elemento viene trovato, <code>findIndex()</code>  restitutisce immediatamente l'idice dell'elemento. Se <code><var>callback</var></code> non restituisce mai un valore {{Glossary("truthy")}} (o la <code>length</code> dell'array è <code>0</code>), <code>findIndex()</code> restituisce <code>-1</code>.</p>
+
+<div class="blockIndicator note">
+<p><strong>Caso limite: </strong>A differenza di altri metodi per array come {{jsxref("Array.some()")}}, <code><var>callback</var></code> viene eseguita anche per gli indici con valori non assegnati.</p>
+</div>
+
+<p><code><var>callback</var></code> è invocata con tre argomenti:</p>
+
+<ol>
+ <li>Il valore dell'elemento</li>
+ <li>L'indice dell'elemento</li>
+ <li>L'oggetto Array che viene percorso</li>
+</ol>
+
+<p>Se viene passato a <code>findIndex()</code> un parametro <code><var>thisArg</var></code>, sarà usato come <code>this</code> in ogni invocazione di <code><var>callback</var></code>. Se non viene passato si usa {{jsxref("undefined")}}.</p>
+
+<p>The range of elements processed by <code>findIndex()</code> is set before the first invocation of <code><var>callback</var></code>. <code><var>callback</var></code> will not process the elements appended to the array after the call to <code>findIndex()</code> begins. If an existing, unvisited element of the array is changed by <code><var>callback</var></code>, its value passed to the <code><var>callback</var></code> will be the value at the time <code>findIndex()</code> visits the element's index.</p>
+
+<p>Elements that are <a href="/en-US/docs/Web/JavaScript/Reference/Operators/delete">deleted</a> are still visited.</p>
+
+<h2 id="Polyfill">Polyfill</h2>
+
+<pre class="brush: js notranslate">// https://tc39.github.io/ecma262/#sec-array.prototype.findindex
+if (!Array.prototype.findIndex) {
+ Object.defineProperty(Array.prototype, 'findIndex', {
+ value: function(predicate) {
+ // 1. Let O be ? ToObject(this value).
+ if (this == null) {
+ throw new TypeError('"this" is null or not defined');
+ }
+
+ var o = Object(this);
+
+ // 2. Let len be ? ToLength(? Get(O, "length")).
+ var len = o.length &gt;&gt;&gt; 0;
+
+ // 3. If IsCallable(predicate) is false, throw a TypeError exception.
+ if (typeof predicate !== 'function') {
+ throw new TypeError('predicate must be a function');
+ }
+
+ // 4. If thisArg was supplied, let T be thisArg; else let T be undefined.
+ var thisArg = arguments[1];
+
+ // 5. Let k be 0.
+ var k = 0;
+
+ // 6. Repeat, while k &lt; len
+ while (k &lt; len) {
+ // a. Let Pk be ! ToString(k).
+ // b. Let kValue be ? Get(O, Pk).
+ // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)).
+ // d. If testResult is true, return k.
+ var kValue = o[k];
+ if (predicate.call(thisArg, kValue, k, o)) {
+ return k;
+ }
+ // e. Increase k by 1.
+ k++;
+ }
+
+ // 7. Return -1.
+ return -1;
+ },
+ configurable: true,
+ writable: true
+ });
+}
+</pre>
+
+<p>If you need to support truly obsolete JavaScript engines that do not support {{jsxref("Object.defineProperty")}}, it is best not to polyfill <code>Array.prototype</code> methods at all, as you cannot make them non-enumerable.</p>
+
+<h2 id="Examples">Examples</h2>
+
+<h3 id="Find_the_index_of_a_prime_number_in_an_array">Find the index of a prime number in an array</h3>
+
+<p>The following example returns the index of the first element in the array that is a prime number, or <code>-1</code> if there is no prime number.</p>
+
+<pre class="brush: js notranslate">function isPrime(num) {
+ for (let i = 2; num &gt; i; i++) {
+ if (num % i == 0) {
+ return false;
+ }
+ }
+ return num &gt; 1;
+}
+
+console.log([4, 6, 8, 9, 12].findIndex(isPrime)); // -1, not found
+console.log([4, 6, 7, 9, 12].findIndex(isPrime)); // 2 (array[2] is 7)
+</pre>
+
+<h3 id="Find_index_using_arrow_function">Find index using arrow function</h3>
+
+<p>The following example finds the index of a fruit using an arrow function:</p>
+
+<pre class="brush: js notranslate">const fruits = ["apple", "banana", "cantaloupe", "blueberries", "grapefruit"];
+
+const index = fruits.findIndex(fruit =&gt; fruit === "blueberries");
+
+console.log(index); // 3
+console.log(fruits[index]); // blueberries
+</pre>
+
+<h2 id="Specifications">Specifications</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Specification</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.prototype.findindex', 'Array.prototype.findIndex')}}</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+<div>
+
+
+<p>{{Compat("javascript.builtins.Array.findIndex")}}</p>
+</div>
+
+<h2 id="See_also">See also</h2>
+
+<ul>
+ <li>{{jsxref("Array.prototype.find()")}}</li>
+ <li>{{jsxref("Array.prototype.indexOf()")}}</li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/flat/index.html b/files/it/web/javascript/reference/global_objects/array/flat/index.html
new file mode 100644
index 0000000000..3c5a81ed4b
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/flat/index.html
@@ -0,0 +1,159 @@
+---
+title: Array.prototype.flat()
+slug: Web/JavaScript/Reference/Global_Objects/Array/flat
+tags:
+ - Array
+ - JavaScript
+ - Prototype
+ - Referenza
+ - flat
+ - metodo
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/flat
+---
+<div></div>
+
+<div>{{JSRef}}</div>
+
+<p><code><font face="Arial, x-locale-body, sans-serif"><span style="background-color: #ffffff;">Il metodo </span></font><strong>flat()</strong></code> crea un nuovo array con tutti gli elementi dei propri sotto-array concatenati ricorsivamente al suo interno fino alla profondità specificata.</p>
+
+<p class="hidden">\{{EmbedInteractiveExample("pages/js/array-flatten.html")}}</p>
+
+<p class="hidden">Il codice sorgente per questo esempio interattivo è mantenuto in una repository GitHub. Se vuoi contribuire al progetto degli esempi interattivi, clona <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a> e inviaci una pull request.</p>
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox notranslate"><var>var newArray = arr</var>.flat(<em>[profondità]</em>);</pre>
+
+<h3 id="Parametri">Parametri</h3>
+
+<dl>
+ <dt><font face="consolas, Liberation Mono, courier, monospace"><span style="background-color: rgba(220, 220, 220, 0.5);">profondità</span></font> {{optional_inline}}</dt>
+ <dd>Il livello di profondità che specifica quanto a fondo la struttura di array annidati deve essere appianata. Default a 1.</dd>
+</dl>
+
+<h3 id="Valore_di_ritorno">Valore di ritorno</h3>
+
+<p>Un nuovo array con gli elementi dei sotto-array concatenati al suo interno.</p>
+
+<h2 id="Esempi">Esempi</h2>
+
+<h3 id="Appianare_array_annidati">Appianare array annidati</h3>
+
+<pre class="brush: js notranslate">var arr1 = [1, 2, [3, 4]];
+arr1.flat();
+// [1, 2, 3, 4]
+
+var arr2 = [1, 2, [3, 4, [5, 6]]];
+arr2.flat();
+// [1, 2, 3, 4, [5, 6]]
+
+var arr3 = [1, 2, [3, 4, [5, 6]]];
+arr3.flat(2);
+// [1, 2, 3, 4, 5, 6]
+</pre>
+
+<h3 id="Appianamento_e_slot_vuoti_negli_array">Appianamento e slot vuoti negli array</h3>
+
+<p>Il metodo flat rimuove gli slot vuoti in un array:</p>
+
+<pre class="brush: js notranslate">var arr4 = [1, 2, , 4, 5];
+arr4.flat();
+// [1, 2, 4, 5]
+</pre>
+
+<h2 id="Alternative">Alternative</h2>
+
+<h3 id="reduce_e_concat"><code>reduce</code> e <code>concat</code></h3>
+
+<pre class="brush: js notranslate">var arr1 = [1, 2, [3, 4]];
+arr1.flat();
+
+//appianare array di un livello
+arr1.reduce((acc, val) =&gt; acc.concat(val), []);// [1, 2, 3, 4]
+
+//o
+const flatSingle = arr =&gt; [].concat(...arr);
+</pre>
+
+<pre class="brush: js notranslate">//abilitare appianamento a una certà profondità usando reduce e concat
+var arr1 = [1,2,3,[1,2,3,4, [2,3,4]]];
+
+function flattenDeep(arr1) {
+ return arr1.reduce((acc, val) =&gt; Array.isArray(val) ? acc.concat(flattenDeep(val)) : acc.concat(val), []);
+}
+flattenDeep(arr1);// [1, 2, 3, 1, 2, 3, 4, 2, 3, 4]
+</pre>
+
+<pre class="brush: js notranslate">//appianamento profondo non ricorsivo usando uno stack
+var arr1 = [1,2,3,[1,2,3,4, [2,3,4]]];
+function flatten(input) {
+ const stack = [...input];
+ const res = [];
+ while (stack.length) {
+ // rimozione valore dallo stack
+ const next = stack.pop();
+ if (Array.isArray(next)) {
+ // reinserimento degli elementi degli array, non modifica l'input originale
+ stack.push(...next);
+ } else {
+ res.push(next);
+ }
+ }
+ //reverse per ripristinare l'ordine originario
+ return res.reverse();
+}
+flatten(arr1);// [1, 2, 3, 1, 2, 3, 4, 2, 3, 4]
+</pre>
+
+<pre class="brush: js notranslate">//appianamento profondo ricorsivo
+function flatten(array) {
+ var flattend = [];
+ !(function flat(array) {
+ array.forEach(function(el) {
+ if (Array.isArray(el)) flat(el);
+ else flattend.push(el);
+ });
+ })(array);
+ return flattend;
+}
+</pre>
+
+<div class="hidden">
+<p>Per favore, non aggiungere polyfill a questo articolo. Per referenze, controllare: <a href="https://discourse.mozilla.org/t/mdn-rfc-001-mdn-wiki-pages-shouldnt-be-a-distributor-of-polyfills/24500">https://discourse.mozilla.org/t/mdn-rfc-001-mdn-wiki-pages-shouldnt-be-a-distributor-of-polyfills/24500</a></p>
+</div>
+
+<h2 id="Specifiche">Specifiche</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specifica</th>
+ <th scope="col">Stato</th>
+ <th scope="col">Commenti</th>
+ </tr>
+ <tr>
+ <td>
+ <p><a href="https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flat"><code>Array.prototype.flat</code> proposal</a></p>
+ </td>
+ <td>Finished (4)</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilità_con_i_browser">Compatibilità con i browser</h2>
+
+<div>
+<div class="hidden">La tabella di compatibilità in questa pagina è generata da dati strutturati. Per favore controlla <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> e mandaci una pull request se vuoi contribuire.</div>
+
+<p>{{Compat("javascript.builtins.Array.flat")}}</p>
+</div>
+
+<h2 id="Vedi_anche">Vedi anche</h2>
+
+<ul>
+ <li>{{jsxref("Array.prototype.flatMap()")}}</li>
+ <li>{{jsxref("Array.prototype.map()")}}</li>
+ <li>{{jsxref("Array.prototype.reduce()")}}</li>
+ <li>{{jsxref("Array.prototype.concat()")}}</li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/flatmap/index.html b/files/it/web/javascript/reference/global_objects/array/flatmap/index.html
new file mode 100644
index 0000000000..4397fd7c5d
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/flatmap/index.html
@@ -0,0 +1,142 @@
+---
+title: Array.prototype.flatMap()
+slug: Web/JavaScript/Reference/Global_Objects/Array/flatMap
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/flatMap
+---
+<div>{{JSRef}}</div>
+
+<p>Il metodo <code><strong>flatMap()</strong></code> prima mappa ogni elemento eseguendo la funzione passata come parametro, poi appiattisce il risultato in un nuovo array. Il comportamento è identico a una chiamata a  {{jsxref("Array.prototype.map","map()")}} seguita da un {{jsxref("Array.prototype.flat","flat()")}} con profondità 1, ma <code>flatMap()</code> in questo caso è la soluzione migliore perché è più efficente delle due chiamate separate.</p>
+
+<p class="hidden">{{EmbedInteractiveExample("pages/js/array-flatmap.html")}}</p>
+
+
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox notranslate"><var>var new_array = arr</var>.flatMap(function <var>callback(currentValue[, index[, array]]) {
+ // restituisci un elemento per il nuovo array
+}</var>[, <var>thisArg</var>])</pre>
+
+<h3 id="Parametri">Parametri</h3>
+
+<dl>
+ <dt><code>callback</code></dt>
+ <dd>Funzione per produrre un elemento del nuovo Array, prevede a sua volta tre parametri:
+ <dl>
+ <dt></dt>
+ <dt><code>currentValue</code></dt>
+ <dd>L'elemento che si sta processando.</dd>
+ <dt><code>index</code>{{optional_inline}}</dt>
+ <dd>L'indice dell'elemento corrente.</dd>
+ <dt><code>array</code>{{optional_inline}}</dt>
+ <dd>L'array che si sta processando con <code>map</code>.</dd>
+ </dl>
+ </dd>
+ <dt><code>thisArg</code>{{optional_inline}}</dt>
+ <dd>Valore usato come <code>this</code> mentre si esegue la <code>callback</code>.</dd>
+</dl>
+
+<h3 id="Risultato">Risultato</h3>
+
+<p>Un nuovo array i cui elementi sono il risultato della chiamata a <code>callback</code>, "appiattiti" ad una profondità di 1</p>
+
+<h2 id="Descrizione">Descrizione</h2>
+
+<p>Guarda {{jsxref("Array.prototype.map()")}} per una descrizione dettagliata della funzione <code>callback</code>. <code>flatMap</code> è identico a una chiamata a <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map">map</a></code> seguita da una chiamata <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat">flat</a></code> con una profondità di 1.</p>
+
+<h2 id="Esempi">Esempi</h2>
+
+<h3 id="map_e_flatMap"><code>map()</code> e <code>flatMap()</code></h3>
+
+<pre class="brush: js notranslate">let arr1 = [1, 2, 3, 4];
+
+arr1.map(x =&gt; [x * 2]);
+// [[2], [4], [6], [8]]
+
+arr1.flatMap(x =&gt; [x * 2]);
+// [2, 4, 6, 8]
+
+// viene appiattito un solo elemento
+arr1.flatMap(x =&gt; [[x * 2]]);
+// [[2], [4], [6], [8]]
+</pre>
+
+<p>Lo stesso risultato lo si può ottenere anche con la sola chiamata a map, di seguito è riportato un esempio migliore di uso di <code>flatMap</code>.</p>
+
+<p>Viene generata una lista di parole da una lista di frasi.</p>
+
+<pre class="brush: js notranslate">let arr1 = ["it's Sunny in", "", "California"];
+
+arr1.map(x =&gt; x.split(" "));
+// [["it's","Sunny","in"],[""],["California"]]
+
+arr1.flatMap(x =&gt; x.split(" "));
+// ["it's","Sunny","in", "", "California"]</pre>
+
+<p>Notare che, a differenza di map da solo, la lunghezza dell'output è diversa tra le due chiamate e in particolare il risultato di <code>flatMap</code> non avrà la stessa lunghezza dell'input.</p>
+
+<h3 id="Aggiungere_e_rimuovere_elementi_durante_lesecuzione_di_map">Aggiungere e rimuovere elementi durante l'esecuzione di <code>map()</code></h3>
+
+<p><code>flatMap</code> può essere usato per aggiungere e rimuovere elementi durante l'esecuzione di <code>map</code>. In altre parole, offre la possibilità di mappare <em>molti a molti</em> (processando ogni input separatamente), anziché sempre <em>uno a uno</em>. In questo senso lavora come opposto di <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter">filter</a>. Basta restituire un array con un solo elemento per mantenere l'oggetto invariato, un array con più elementi, invece, aggiungerà questi al risultato, un array vuoto per rimuovere l'elemento corrente.</p>
+
+<pre class="brush: js notranslate">// Per rimuovere i numeri negativi e dividere i numeri dispari in un numero pari e un 1
+let a = [5, 4, -3, 20, 17, -33, -4, 18]
+// |\ \ x | | \ x x |
+// [4,1, 4, 20, 16, 1, 18]
+
+a.flatMap( (n) =&gt;
+ (n &lt; 0) ? [] :
+  (n % 2 == 0) ? [n] :
+  [n-1, 1]
+)
+
+// expected output: [4, 1, 4, 20, 16, 1, 18]
+</pre>
+
+<h2 id="Alternative">Alternative</h2>
+
+<h3 id="reduce_and_concat"><code>reduce()</code> and <code>concat()</code></h3>
+
+<pre class="brush: js notranslate">var arr = [1, 2, 3, 4];
+
+arr.flatMap(x =&gt; [x, x * 2]);
+// si ottiene lo stesso risultato con
+arr.reduce((acc, x) =&gt; acc.concat([x, x * 2]), []);
+// [1, 2, 2, 4, 3, 6, 4, 8]
+</pre>
+
+<p>Notare che questa soluzione non è efficente e non dovrebbe essere usata per array di grandi dimensioni: in ogni iterazione viene creato un nuovo array temporaneo che dovrà essere deallocato dal garbae collector, e copia gli elementi dall'array corrente (<code>acc</code>), in un nuovo array ad ogni iterazione invece di aggiungerli ad uno preesistente.</p>
+
+<div class="hidden">
+<p>Please do not add polyfills on this article. For reference, please check: <a href="https://discourse.mozilla.org/t/mdn-rfc-001-mdn-wiki-pages-shouldnt-be-a-distributor-of-polyfills/24500">https://discourse.mozilla.org/t/mdn-rfc-001-mdn-wiki-pages-shouldnt-be-a-distributor-of-polyfills/24500</a></p>
+</div>
+
+<h2 id="Specifiche">Specifiche</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specifica</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.prototype.flatmap', 'Array.prototype.flatMap')}}</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilità_browser">Compatibilità browser</h2>
+
+<div>
+
+
+<p>{{Compat("javascript.builtins.Array.flatMap")}}</p>
+</div>
+
+<h2 id="Vedi_anche">Vedi anche</h2>
+
+<ul>
+ <li>{{jsxref("Array.prototype.flat()")}}</li>
+ <li>{{jsxref("Array.prototype.map()")}}</li>
+ <li>{{jsxref("Array.prototype.reduce()")}}</li>
+ <li>{{jsxref("Array.prototype.concat()")}}</li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/foreach/index.html b/files/it/web/javascript/reference/global_objects/array/foreach/index.html
new file mode 100644
index 0000000000..dbd4919852
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/foreach/index.html
@@ -0,0 +1,331 @@
+---
+title: Array.prototype.forEach()
+slug: Web/JavaScript/Reference/Global_Objects/Array/forEach
+tags:
+ - Array
+ - ECMAScript 5
+ - JavaScript
+ - Prototype
+ - Referenza
+ - metodo
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/forEach
+---
+<div>{{JSRef}}</div>
+
+<p>Il metodo <code><strong>forEach()</strong></code> esegue una funzione fornita una volta per ogni elemento dell'array.</p>
+
+<div>{{EmbedInteractiveExample("pages/js/array-foreach.html")}}</div>
+
+
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox"><var>arr</var>.forEach(<var>callback(currentValue [, index [, array]])</var>[, <var>thisArg</var>]);</pre>
+
+<h3 id="Parametri">Parametri</h3>
+
+<dl>
+ <dt><code>callback</code></dt>
+ <dd>Funzione da eseguire per ciascun elemento, prendendo tre argomenti:</dd>
+ <dd>
+ <dl>
+ <dt><code>currentValue</code></dt>
+ <dd>L'elemento corrente in elaborazione nell'array.</dd>
+ <dt><code>index</code> {{optional_inline}}</dt>
+ <dd>L'indice dell'elemento corrente in elaborazione nell'array.</dd>
+ <dt><code>array</code> {{optional_inline}}</dt>
+ <dd>L'array a cui viene applicato <code>forEach()</code>.</dd>
+ </dl>
+ </dd>
+ <dt><code>thisArg</code> {{optional_inline}}</dt>
+ <dd>Valore da utilizzare come <code>this</code> quando si esegue <code>callback</code>.</dd>
+</dl>
+
+<h2 id="Descrizione">Descrizione</h2>
+
+<p><code>forEach()</code> esegue il <code>callback</code> fornito una volta per ciascun elemento presente nell'array in ordine crescente. Non è invocato per le proprietà dell'indice che sono state eliminate o non inizializzate (ad esempio su array sparsi).</p>
+
+<p><code>callback</code> viene invocato con tre argomenti:</p>
+
+<ul>
+ <li>il valore dell'elemento</li>
+ <li>l'indice dell'elemento</li>
+ <li>l'array che deve essere iterato</li>
+</ul>
+
+<p>Se viene fornito il parametro <code>thisArg</code> a <code>forEach()</code>, verrà utilizzato come valore <code>this</code> del callback. Altrimenti, il valore {{jsxref("undefined")}} sarà usato come valore <code>this</code>. Il valore <code>this</code> alla fine osservabile da <code>callback</code> è determinato secondo <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this">le consuete regole per determinare il <code>this</code> visto da una funzione</a>.</p>
+
+<p>L'intervallo di elementi elaborati da <code>forEach()</code> viene impostato prima della prima chiamata del <code>callback</code>. Gli elementi aggiunti all'array dopo che la chiamata <code>forEach()</code> inizia non saranno calcolati da <code>callback</code>. Se i valori degli elementi esistenti dell'array vengono modificati, il valore passato a <code>callback</code> sarà il valore al momento in cui <code>forEach()</code> li visita; gli elementi che vengono cancellati prima di essere visitati non vengono visitati. Se gli elementi già visitati vengono rimossi (ad esempio usando {{jsxref("Array.prototype.shift()", "shift()")}}) durante l'iterazione, gli elementi successivi verranno saltati - vedi l'esempio sotto.</p>
+
+<p><code>forEach()</code> esegue la funzione <code>callback</code> una volta per ogni elemento dell'array; a differenza di {{jsxref("Array.prototype.map()", "map()")}} o {{jsxref("Array.prototype.reduce()", "reduce()")}} restituisce sempre {{jsxref("undefined")}} e non è concatenabile. Il tipico caso d'uso è eseguire effetti collaterali alla fine del chain.</p>
+
+<p><code>forEach()</code> non muta l'array su cui è chiamato (sebbene <code>callback</code>, se invocato, possa farlo).</p>
+
+<div class="note">
+<p>Non c'è modo di fermare o interrompere un loop <code>forEach()</code> se non lanciando un'eccezione. Se hai bisogno di un simile comportamento, il metodo <code>forEach()</code> è lo strumento sbagliato.</p>
+
+<p>La risoluzione anticipata può essere eseguita con:</p>
+
+<ul>
+ <li>Un loop semplice</li>
+ <li>Un loop <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of">for...of</a></li>
+ <li>{{jsxref("Array.prototype.every()")}}</li>
+ <li>{{jsxref("Array.prototype.some()")}}</li>
+ <li>{{jsxref("Array.prototype.find()")}}</li>
+ <li>{{jsxref("Array.prototype.findIndex()")}}</li>
+</ul>
+
+<p>Gli altri metodi per array: {{jsxref("Array.prototype.every()")}}, {{jsxref("Array.prototype.some()")}}, {{jsxref("Array.prototype.find()")}}, e {{jsxref("Array.prototype.findIndex()")}} testano gli elementi dell'array con un predicato restituendo un valore di verità per determinare se è necessaria un'ulteriore iterazione.</p>
+</div>
+
+<h2 id="Esempi">Esempi</h2>
+
+<h3 id="Convertire_un_loop_for_in_forEach">Convertire un loop for in forEach</h3>
+
+<pre class="brush:js">const items = ['item1', 'item2', 'item3'];
+const copy = [];
+
+// prima
+for (let i=0; i&lt;items.length; i++) {
+ copy.push(items[i]);
+}
+
+// dopo
+items.forEach(function(item) {
+ copy.push(item);
+});
+</pre>
+
+<h3 id="Stampa_del_contenuto_di_un_array">Stampa del contenuto di un array</h3>
+
+<div class="blockIndicator note">
+<p><strong>Note:</strong> Per visualizzare il contenuto di un array nella console, puoi utilizzare <code><a href="https://developer.mozilla.org/en-US/docs/Web/API/Console/table">console.table()</a></code> che stamperà una versione formattata dell'array. L'esempio seguente illustra un altro modo per farlo, usando <code>forEach()</code>.</p>
+</div>
+
+<p>Il seguente codice logga una linea per ogni elemento in un array:</p>
+
+<pre class="brush:js">function logArrayElements(element, index, array) {
+ console.log('a[' + index + '] = ' + element);
+}
+
+// Nota che l'indice 2 viene saltato poiché non vi è alcun elemento
+// in quella posizione nell'array.
+[2, 5, , 9].forEach(logArrayElements);
+// logga:
+// a[0] = 2
+// a[1] = 5
+// a[3] = 9
+</pre>
+
+<h3 id="Usare_thisArg">Usare <code>thisArg</code></h3>
+
+<p>Il seguente esempio (inventato) aggiorna le proprietà di un oggetto da ciascuna voce dell'array:</p>
+
+<pre class="brush:js">function Counter() {
+ this.sum = 0;
+ this.count = 0;
+}
+Counter.prototype.add = function(array) {
+ array.forEach(function(entry) {
+ this.sum += entry;
+ ++this.count;
+ }, this);
+ // ^---- Nota
+};
+
+const obj = new Counter();
+obj.add([2, 5, 9]);
+obj.count;
+// 3
+obj.sum;
+// 16
+</pre>
+
+<p>Poiché il parametro <code>thisArg</code> (<code>this</code>) viene fornito a <code>forEach()</code>, viene passato a <code>callback</code> ogni volta che viene richiamato, per essere utilizzato come valore <code>this</code>.</p>
+
+<div class="note">
+<p>Se si passa l'argomento della funzione utilizzando <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions">un'espressione della funzione a freccia</a> il parametro <code>thisArg</code> può essere omesso poiché le funzioni a freccia associano in modo lessicale il valore {{jsxref("Operators/this", "this")}}.</p>
+</div>
+
+<h3 id="Una_funzione_di_copia_di_oggetti">Una funzione di copia di oggetti</h3>
+
+<p>Il seguente codice crea una copia di un dato oggetto. Esistono diversi modi per creare una copia di un oggetto; il seguente è solo un modo e viene presentato per spiegare come funziona <code>Array.prototype.forEach()</code> usando le funzioni di meta proprietà ECMAScript 5 <code>Object.*</code>.</p>
+
+<pre class="brush: js">function copy(obj) {
+ const copy = Object.create(Object.getPrototypeOf(obj));
+ const propNames = Object.getOwnPropertyNames(obj);
+
+ propNames.forEach(function(name) {
+ const desc = Object.getOwnPropertyDescriptor(obj, name);
+ Object.defineProperty(copy, name, desc);
+ });
+
+ return copy;
+}
+
+const obj1 = { a: 1, b: 2 };
+const obj2 = copy(obj1); // obj2 looks like obj1 now
+</pre>
+
+<h3 id="Se_l'array_viene_modificato_durante_l'iterazione_altri_elementi_potrebbero_essere_saltati.">Se l'array viene modificato durante l'iterazione, altri elementi potrebbero essere saltati.</h3>
+
+<p>L'esempio seguente registra "uno", "due", "quattro". Quando viene raggiunta la voce contenente il valore "due", la prima voce dell'intero array viene spostata, il che comporta il trasferimento di tutte le voci rimanenti in una posizione. Poiché l'elemento "quattro" è ora in una posizione precedente nell'array, "tre" verrà saltato. <code>forEach()</code> non esegue una copia dell'array prima di iterare.</p>
+
+<pre class="brush:js">var words = ['uno', 'due', 'tre', 'quattro'];
+words.forEach(function(word) {
+ console.log(word);
+ if (word === 'due') {
+ words.shift();
+ }
+});
+// uno
+// due
+// quattro
+</pre>
+
+<h3 id="Appiattire_un_array">Appiattire un array</h3>
+
+<p>Il seguente esempio è qui solo per scopi didattici. Se si desidera appiattire un array usando metodi built-in, è possibile utilizzare {{jsxref("Array.prototype.flat()")}} (che dovrebbe essere parte di ES2019 e già implementato in alcuni browser).</p>
+
+<pre class="brush: js">/**
+ * Flattens ha passato un array in un array dimensionale
+ *
+ * @params {array} arr
+ * @returns {array}
+ */
+function flatten(arr) {
+ const result = []
+
+ arr.forEach((i) =&gt; {
+ if (Array.isArray(i)) {
+ result.push(...flatten(i))
+ } else {
+ result.push(i)
+ }
+ })
+
+ return result
+}
+
+// Uso
+const problem = [1, 2, 3, [4, 5, [6, 7], 8, 9]]
+
+flatten(problem) // [1, 2, 3, 4, 5, 6, 7, 8, 9]
+</pre>
+
+<h2 id="Polyfill">Polyfill</h2>
+
+<p><code>forEach()</code> è stato aggiunto allo standard ECMA-262 nella quinta edizione; in quanto tale potrebbe non essere presente in altre implementazioni dello standard. È possibile aggirare questo problema inserendo il seguente codice all'inizio degli script, consentendo l'uso di <code>forEach()</code> nelle implementazioni che non lo supportano in modo nativo. Questo algoritmo è esattamente quello specificato in ECMA-262, 5a edizione, assumendo {{jsxref("Object")}} e {{jsxref("TypeError")}} hanno i loro valori originali e quel <code>callback.call()</code> valuta il valore originale di {{jsxref("Function.prototype.call()")}}.</p>
+
+<pre class="brush: js">// Production steps of ECMA-262, Edition 5, 15.4.4.18
+// Reference: http://es5.github.io/#x15.4.4.18
+if (!Array.prototype.forEach) {
+
+ Array.prototype.forEach = function(callback/*, thisArg*/) {
+
+ var T, k;
+
+ if (this == null) {
+ throw new TypeError('this is null or not defined');
+ }
+
+ // 1. Let O be the result of calling toObject() passing the
+ // |this| value as the argument.
+ var O = Object(this);
+
+ // 2. Let lenValue be the result of calling the Get() internal
+ // method of O with the argument "length".
+ // 3. Let len be toUint32(lenValue).
+ var len = O.length &gt;&gt;&gt; 0;
+
+ // 4. If isCallable(callback) is false, throw a TypeError exception.
+ // See: http://es5.github.com/#x9.11
+ if (typeof callback !== 'function') {
+ throw new TypeError(callback + ' is not a function');
+ }
+
+ // 5. If thisArg was supplied, let T be thisArg; else let
+ // T be undefined.
+ if (arguments.length &gt; 1) {
+ T = arguments[1];
+ }
+
+ // 6. Let k be 0.
+ k = 0;
+
+ // 7. Repeat while k &lt; len.
+ while (k &lt; len) {
+
+ var kValue;
+
+ // a. Let Pk be ToString(k).
+ // This is implicit for LHS operands of the in operator.
+ // b. Let kPresent be the result of calling the HasProperty
+ // internal method of O with argument Pk.
+ // This step can be combined with c.
+ // c. If kPresent is true, then
+ if (k in O) {
+
+ // i. Let kValue be the result of calling the Get internal
+ // method of O with argument Pk.
+ kValue = O[k];
+
+ // ii. Call the Call internal method of callback with T as
+ // the this value and argument list containing kValue, k, and O.
+ callback.call(T, kValue, k, O);
+ }
+ // d. Increase k by 1.
+ k++;
+ }
+ // 8. return undefined.
+ };
+}
+</pre>
+
+<h2 id="Specifiche">Specifiche</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specifica</th>
+ <th scope="col">Stato</th>
+ <th scope="col">Commento</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES5.1', '#sec-15.4.4.18', 'Array.prototype.forEach')}}</td>
+ <td>{{Spec2('ES5.1')}}</td>
+ <td>Definizione iniziale Implementato in JavaScript 1.6.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-array.prototype.foreach', 'Array.prototype.forEach')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.prototype.foreach', 'Array.prototype.forEach')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilità_con_i_browser">Compatibilità con i browser</h2>
+
+<div>
+
+
+<p>{{Compat("javascript.builtins.Array.forEach")}}</p>
+</div>
+
+<h2 id="Vedi_anche">Vedi anche</h2>
+
+<ul>
+ <li>{{jsxref("Array.prototype.find()")}}</li>
+ <li>{{jsxref("Array.prototype.findIndex()")}}</li>
+ <li>{{jsxref("Array.prototype.map()")}}</li>
+ <li>{{jsxref("Array.prototype.filter()")}}</li>
+ <li>{{jsxref("Array.prototype.every()")}}</li>
+ <li>{{jsxref("Array.prototype.some()")}}</li>
+ <li>{{jsxref("Map.prototype.forEach()")}}</li>
+ <li>{{jsxref("Set.prototype.forEach()")}}</li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/from/index.html b/files/it/web/javascript/reference/global_objects/array/from/index.html
new file mode 100644
index 0000000000..83baed1267
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/from/index.html
@@ -0,0 +1,242 @@
+---
+title: Array.from()
+slug: Web/JavaScript/Reference/Global_Objects/Array/from
+tags:
+ - Array
+ - ECMAScript 2015
+ - JavaScript
+ - Referenza
+ - metodo
+ - polyfill
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/from
+---
+<div>{{JSRef}}</div>
+
+<p>Il metodo <code><strong>Array.from()</strong></code> crea una nuova istanza <code>Array</code> copiata superficialmente da un oggetto array-like o iterabile.</p>
+
+<div>{{EmbedInteractiveExample("pages/js/array-from.html")}}</div>
+
+
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox">Array.from(arrayLike[, mapFn[, thisArg]])
+</pre>
+
+<h3 id="Parametri">Parametri</h3>
+
+<dl>
+ <dt><code>arrayLike</code></dt>
+ <dd>Un oggetto array-like o iterabile da convertire in un array.</dd>
+ <dt><code>mapFn</code> {{Optional_inline}}</dt>
+ <dd>Funzione map per chiamare su ogni elemento dell'array.</dd>
+ <dt><code>thisArg</code> {{Optional_inline}}</dt>
+ <dd>Valore da utilizzare come <code>this</code> quando <code>mapFn</code> viene eseguita.</dd>
+</dl>
+
+<h3 id="Valore_di_ritorno">Valore di ritorno</h3>
+
+<p>Una nuova istanza {{jsxref("Array")}}.</p>
+
+<h2 id="Descrizione">Descrizione</h2>
+
+<p><code>Array.from()</code> consente di creare <code>Array</code> da:</p>
+
+<ul>
+ <li>oggetti array-like (oggetti con una proprietà <code>length</code> ed elementi indicizzati) o</li>
+ <li><a href="/en-US/docs/Web/JavaScript/Guide/iterable">oggetti iterabili</a> (oggetti in cui è possibile ottenere i suoi elementi, come ad esempio {{jsxref("Map")}} e {{jsxref("Set")}}).</li>
+</ul>
+
+<p><code>Array.from()</code> ha un parametro opzionale <code>mapFn</code>, che ti permette di eseguire una funzione {{jsxref("Array.prototype.map", "map")}} su ogni elemento dell'array (o dell'oggetto sottoclasse) che si sta creando. Più chiaramente, <code>Array.from(obj, mapFn, thisArg)</code> ha lo stesso risultato di <code>Array.from(obj).map(mapFn, thisArg)</code>, tranne che non crea un array intermedio. Questo è particolarmente importante per alcune sottoclassi di array, come gli <a href="/en-US/docs/Web/JavaScript/Typed_arrays">array tipizzati</a>, poiché l'array intermedio avrebbe necessariamente valori troncati per adattarsi al tipo appropriato.</p>
+
+<p>La proprietà <code>length</code> del metodo <code>from()</code> è 1.</p>
+
+<p>In ES2015, la sintassi della classe consente la sottoclassificazione di entrambe le classi predefinite e definite dall'utente; di conseguenza, i metodi statici come <code>Array.from</code> sono "ereditati" dalle sottoclassi di <code>Array</code> e creano nuove istanze della sottoclasse, non <code>Array</code>.</p>
+
+<h2 id="Esempi">Esempi</h2>
+
+<h3 id="Array_da_una_String">Array da una <code>String</code></h3>
+
+<pre class="brush: js">Array.from('foo');
+// ["f", "o", "o"]</pre>
+
+<h3 id="Array_da_un_Set">Array da un <code>Set</code></h3>
+
+<pre class="brush: js">var s = new Set(['foo', window]);
+Array.from(s);
+// ["foo", window]</pre>
+
+<h3 id="Array_da_una_Map">Array da una <code>Map</code></h3>
+
+<pre class="brush: js">var m = new Map([[1, 2], [2, 4], [4, 8]]);
+Array.from(m);
+// [[1, 2], [2, 4], [4, 8]]
+
+var mapper = new Map([['1', 'a'], ['2', 'b']]);
+Array.from(mapper.values());
+// ['a', 'b'];
+
+Array.from(mapper.keys());
+// ['1', '2'];
+</pre>
+
+<h3 id="Array_di_un_oggetto_Array-like_(arguments)">Array di un oggetto Array-like (arguments)</h3>
+
+<pre class="brush: js">function f() {
+ return Array.from(arguments);
+}
+
+f(1, 2, 3);
+
+// [1, 2, 3]</pre>
+
+<h3 id="Utilizzo_delle_funzioni_a_freccia_e_Array.from">Utilizzo delle funzioni a freccia e <code>Array.from</code></h3>
+
+<pre class="brush: js">// Utilizzando una funzione freccia come funzione map
+// per manipolare gli elementi
+Array.from([1, 2, 3], x =&gt; x + x);
+// [2, 4, 6]
+
+
+// Genera una sequenza di numeri
+// Poiché l'array è inizializzato con `undefined` su ogni posizione,
+// il valore di `v` sotto sarà `undefined`
+Array.from({length: 5}, (v, i) =&gt; i);
+// [0, 1, 2, 3, 4]
+</pre>
+
+<h3 id="Generatore_di_sequenze_(range)">Generatore di sequenze (range)</h3>
+
+<pre class="brush: js">// Funzione del generatore di sequenze (comunemente denominata "range", ad esempio Clojure, PHP ecc.)
+const range = (start, stop, step) =&gt; Array.from({ length: (stop - start) / step }, (_, i) =&gt; start + (i * step));
+
+// Genera numeri range 0..4
+range(0, 5, 1);
+// [0, 1, 2, 3, 4]
+
+// Genera l'alfabeto usando Array.from facendolo usare come sequenza
+range('A'.charCodeAt(0), 'Z'.charCodeAt(0) + 1, 1).map(x =&gt; String.fromCharCode(x));
+// ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
+</pre>
+
+<h2 id="Polyfill">Polyfill</h2>
+
+<p><code>Array.from</code> è stato aggiunto allo standard ECMA-262 nella sesta edizione (ES2015); in quanto tale potrebbe non essere presente in altre implementazioni dello standard. È possibile aggirare questo problema inserendo il seguente codice all'inizio degli script, consentendo l'uso di <code>Array.from</code> in implementazioni che non lo supportano in modo nativo. Questo algoritmo è esattamente quello specificato in ECMA-262, 6a edizione, assumendo che <code>Object</code> e <code>TypeError</code> abbiano i loro valori originali e che <code>callback.call</code> valuti il valore originale di {{jsxref("Function.prototype.call")}}. Inoltre, poiché i veri iterabili non possono essere polyfilled, questa implementazione non supporta iterables generici come definito nella sesta edizione di ECMA-262.</p>
+
+<pre class="brush: js">// Production steps of ECMA-262, Edition 6, 22.1.2.1
+if (!Array.from) {
+ Array.from = (function () {
+ var toStr = Object.prototype.toString;
+ var isCallable = function (fn) {
+ return typeof fn === 'function' || toStr.call(fn) === '[object Function]';
+ };
+ var toInteger = function (value) {
+ var number = Number(value);
+ if (isNaN(number)) { return 0; }
+ if (number === 0 || !isFinite(number)) { return number; }
+ return (number &gt; 0 ? 1 : -1) * Math.floor(Math.abs(number));
+ };
+ var maxSafeInteger = Math.pow(2, 53) - 1;
+ var toLength = function (value) {
+ var len = toInteger(value);
+ return Math.min(Math.max(len, 0), maxSafeInteger);
+ };
+
+ // The length property of the from method is 1.
+ return function from(arrayLike/*, mapFn, thisArg */) {
+ // 1. Let C be the this value.
+ var C = this;
+
+ // 2. Let items be ToObject(arrayLike).
+ var items = Object(arrayLike);
+
+ // 3. ReturnIfAbrupt(items).
+ if (arrayLike == null) {
+ throw new TypeError('Array.from requires an array-like object - not null or undefined');
+ }
+
+ // 4. If mapfn is undefined, then let mapping be false.
+ var mapFn = arguments.length &gt; 1 ? arguments[1] : void undefined;
+ var T;
+ if (typeof mapFn !== 'undefined') {
+ // 5. else
+ // 5. a If IsCallable(mapfn) is false, throw a TypeError exception.
+ if (!isCallable(mapFn)) {
+ throw new TypeError('Array.from: when provided, the second argument must be a function');
+ }
+
+ // 5. b. If thisArg was supplied, let T be thisArg; else let T be undefined.
+ if (arguments.length &gt; 2) {
+ T = arguments[2];
+ }
+ }
+
+ // 10. Let lenValue be Get(items, "length").
+ // 11. Let len be ToLength(lenValue).
+ var len = toLength(items.length);
+
+ // 13. If IsConstructor(C) is true, then
+ // 13. a. Let A be the result of calling the [[Construct]] internal method
+ // of C with an argument list containing the single item len.
+ // 14. a. Else, Let A be ArrayCreate(len).
+ var A = isCallable(C) ? Object(new C(len)) : new Array(len);
+
+ // 16. Let k be 0.
+ var k = 0;
+ // 17. Repeat, while k &lt; len… (also steps a - h)
+ var kValue;
+ while (k &lt; len) {
+ kValue = items[k];
+ if (mapFn) {
+ A[k] = typeof T === 'undefined' ? mapFn(kValue, k) : mapFn.call(T, kValue, k);
+ } else {
+ A[k] = kValue;
+ }
+ k += 1;
+ }
+ // 18. Let putStatus be Put(A, "length", len, true).
+ A.length = len;
+ // 20. Return A.
+ return A;
+ };
+ }());
+}
+</pre>
+
+<h2 id="Specifiche">Specifiche</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Specifica</th>
+ <th scope="col">Stato</th>
+ <th scope="col">Commento</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.from', 'Array.from')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES2015', '#sec-array.from', 'Array.from')}}</td>
+ <td>{{Spec2('ES2015')}}</td>
+ <td>Definizione iniziale.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilità_con_i_browser">Compatibilità con i browser</h2>
+
+
+
+<p>{{Compat("javascript.builtins.Array.from")}}</p>
+
+<h2 id="Vedi_anche">Vedi anche</h2>
+
+<ul>
+ <li>{{jsxref("Array")}}</li>
+ <li>{{jsxref("Array.prototype.map()")}}</li>
+ <li>{{jsxref("TypedArray.from()")}}</li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/includes/index.html b/files/it/web/javascript/reference/global_objects/array/includes/index.html
new file mode 100644
index 0000000000..04dc817974
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/includes/index.html
@@ -0,0 +1,162 @@
+---
+title: Array.prototype.includes()
+slug: Web/JavaScript/Reference/Global_Objects/Array/includes
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/includes
+---
+<div>{{JSRef}}</div>
+
+<p>Il metodo <code><strong>includes()</strong></code> determina se un array include un certo elemento, ritornando <code>true</code> o <code>false</code> a seconda del caso</p>
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox">var <var>boolean</var> = <var>array</var>.includes(<var>searchElement</var>[, <var>fromIndex</var>])</pre>
+
+<h3 id="Parametri">Parametri</h3>
+
+<dl>
+ <dt><code>searchElement</code></dt>
+ <dd>L'elemento da cercare.</dd>
+ <dt><code>fromIndex</code></dt>
+ <dd>Opzionale. La posizione nell'array da cui partire per cercare l'elemento <code>searchElement</code>. Un valore negativo ricerca dal valore di <code>array.length + fromIndex</code> in maniera ascendente. Il valore di default è 0.</dd>
+</dl>
+
+<h3 id="Valore_di_ritorno">Valore di ritorno</h3>
+
+<p>Un {{jsxref("Boolean")}}.</p>
+
+<h2 id="Examples">Examples</h2>
+
+<pre class="brush: js">[1, 2, 3].includes(2); // true
+[1, 2, 3].includes(4); // false
+[1, 2, 3].includes(3, 3); // false
+[1, 2, 3].includes(3, -1); // true
+[1, 2, NaN].includes(NaN); // true
+</pre>
+
+<h2 id="Polyfill">Polyfill</h2>
+
+<pre class="brush: js">if (!Array.prototype.includes) {
+ Array.prototype.includes = function(searchElement /*, fromIndex*/) {
+ 'use strict';
+ if (this == null) {
+ throw new TypeError('Array.prototype.includes called on null or undefined');
+ }
+
+ var O = Object(this);
+ var len = parseInt(O.length, 10) || 0;
+ if (len === 0) {
+ return false;
+ }
+ var n = parseInt(arguments[1], 10) || 0;
+ var k;
+ if (n &gt;= 0) {
+ k = n;
+ } else {
+ k = len + n;
+ if (k &lt; 0) {k = 0;}
+ }
+ var currentElement;
+ while (k &lt; len) {
+ currentElement = O[k];
+ if (searchElement === currentElement ||
+ (searchElement !== searchElement &amp;&amp; currentElement !== currentElement)) { // NaN !== NaN
+ return true;
+ }
+ k++;
+ }
+ return false;
+ };
+}
+</pre>
+
+<h2 id="Specifications">Specifications</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES7', '#sec-array.prototype.includes', 'Array.prototype.includes')}}</td>
+ <td>{{Spec2('ES7')}}</td>
+ <td>Definizione iniziale.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.prototype.includes', 'Array.prototype.includes')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+<div>{{CompatibilityTable}}</div>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Edge</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>
+ <p>{{CompatChrome(47)}}</p>
+ </td>
+ <td>43</td>
+ <td>{{CompatNo}}</td>
+ <td>14279+</td>
+ <td>34</td>
+ <td>9</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android</th>
+ <th>Android Webview</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ <th>Chrome for Android</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatNo}}</td>
+ <td>
+ <p>{{CompatChrome(47)}}</p>
+ </td>
+ <td>43</td>
+ <td>{{CompatNo}}</td>
+ <td>34</td>
+ <td>9</td>
+ <td>
+ <p>{{CompatChrome(47)}}</p>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="Vedi_anche">Vedi anche</h2>
+
+<ul>
+ <li>{{jsxref("TypedArray.prototype.includes()")}}</li>
+ <li>{{jsxref("String.prototype.includes()")}}</li>
+ <li>{{jsxref("Array.prototype.indexOf()")}}</li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/index.html b/files/it/web/javascript/reference/global_objects/array/index.html
new file mode 100644
index 0000000000..844d1baf00
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/index.html
@@ -0,0 +1,480 @@
+---
+title: Array
+slug: Web/JavaScript/Reference/Global_Objects/Array
+tags:
+ - Array
+ - JavaScript
+ - NeedsTranslation
+ - TopicStub
+translation_of: Web/JavaScript/Reference/Global_Objects/Array
+---
+<div>{{JSRef}}</div>
+
+<h2 id="Summary" name="Summary">Sommario</h2>
+
+<p>L'oggetto <strong><code>Array </code></strong>di JavaScript  è un oggetto globale che è utilizzato nella costruzione di array; che sono oggetti di alto-livello del tipo lista.</p>
+
+<p><strong>Creare un Array</strong></p>
+
+<pre class="brush: js">var fruits = ["Apple", "Banana"];
+
+console.log(fruits.length);
+// 2
+</pre>
+
+<p><strong>Accedere (index into) ad un Array item</strong></p>
+
+<pre class="brush: js">var first = fruits[0];
+// Apple
+
+var last = fruits[fruits.length - 1];
+// Banana
+</pre>
+
+<p><strong>Loop in un  Array</strong></p>
+
+<pre class="brush: js">fruits.forEach(function (item, index, array) {
+  console.log(item, index);
+});
+// Apple 0
+// Banana 1
+</pre>
+
+<p><strong>Aggiungere alla fine di  un Array</strong></p>
+
+<pre class="brush: js">var newLength = fruits.push("Orange");
+// ["Apple", "Banana", "Orange"]
+</pre>
+
+<p><strong>Rimuovere dalla fine di un Array</strong></p>
+
+<pre class="brush: js">var last = fruits.pop(); // remove Orange (from the end)
+// ["Apple", "Banana"];
+</pre>
+
+<p><strong>Rimuovere dall'inizio di un Array</strong></p>
+
+<pre class="brush: js">var first = fruits.shift(); // remove Apple from the front
+// ["Banana"];
+</pre>
+
+<p><strong>Aggiungere al'inizio di un Array</strong></p>
+
+<pre class="brush: js">var newLength = fruits.unshift("Strawberry") // add to the front
+// ["Strawberry", "Banana"];
+</pre>
+
+<p><strong>Trovare l'indice di un elemento nell'Array</strong></p>
+
+<pre class="brush: js">fruits.push("Mango");
+// ["Strawberry", "Banana", "Mango"]
+
+var pos = fruits.indexOf("Banana");
+// 1
+</pre>
+
+<p><strong>Rimuovere un elemento tramite la Posizione dell'Indice</strong></p>
+
+<pre class="brush: js">var removedItem = fruits.splice(pos, 1); // this is how to remove an item
+// ["Strawberry", "Mango"]
+</pre>
+
+<p><strong>Copiare un Array</strong></p>
+
+<pre class="brush: js">var shallowCopy = fruits.slice(); // this is how to make a copy
+// ["Strawberry", "Mango"]
+</pre>
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox"><code>[<var>element0</var>, <var>element1</var>, ..., <var>elementN</var>]
+new Array(<var>element0</var>, <var>element1</var>[, ...[, <var>elementN</var>]])
+new Array(<var>arrayLength</var>)</code></pre>
+
+<dl>
+ <dt><code>element<em>N</em></code></dt>
+ <dd>Un array JavaScript è inizializzato con gli elementi dati, eccetto nel caso in cui un argomento singolo è passato al costruttore dell'<code>Array</code> e l'argomento è un numero. (Vedere sotto.) Notare che questo caso speciale si applica solo agli array JavaScript creati con il costruttore <code>Array</code>, non array literals creati con la sintassi a parentesi.</dd>
+ <dt><code>arrayLength</code></dt>
+ <dd>Se l'unico argomento passato al costruttore <code>Array</code> è un integer tra  0 e 2<sup>32</sup>-1 (inclusivo), questo restituisce un nuovo array JavaScript con la lunghezza settata su quel numero. Se l'argomento è un qualsiasi altro numero, un eccezione {{jsxref("Global_Objects/RangeError", "RangeError")}} è lanciata.</dd>
+</dl>
+
+<h2 id="Descrizione">Descrizione</h2>
+
+<p>Gli Array sono come oggetti di tipo lista il cui prototipo ha metodi per performare operazioni trasversali e di mutazione. Nè la lunghezza di un array JavaScript o i tipi dei suoi elementi sono fissati. Poichè la grandezza della lunghezza di un array cresce o diminuisce in qualsiasi momento, gli array JavaScript non danno garanzia di essere compatti; questo dipende da come il programmatore sceglie di usarli. In generale, queste sono caratteristiche convenienti; ma se tali  caratteristiche non fossero desiderabili per un utilizzo particolare, si potrebbe considerare di utilizzare i typed arrays.</p>
+
+<p>Alcuni pensano che<a class="external" href="http://www.andrewdupont.net/2006/05/18/javascript-associative-arrays-considered-harmful/"> non si dovrebbe un utilizzare un array come un associative array</a>. In ogni  caso, si può utilizzare un semplice {{jsxref("Global_Objects/Object", "objects")}} invece, con i suoi avvertimenti. Vedere il post <a class="external" href="http://www.less-broken.com/blog/2010/12/lightweight-javascript-dictionaries.html">Lightweight JavaScript dictionaries with arbitrary keys</a> come esempio.</p>
+
+<h3 id="Accedere_ad_elementi_di_array">Accedere ad elementi di  array </h3>
+
+<p>Gli array JavaScript sono indicizzati a zero: il primo elemento di un array è all'indice <code>0</code>, e l'ultimo elemento è all'indice uguale al valore della proprietà dell'array {{jsxref("Array.length", "length")}}  meno 1. Usare un numero di indice invalido restituisce <code>undefined</code>.</p>
+
+<pre class="brush: js">var arr = ['this is the first element', 'this is the second element'];
+console.log(arr[0]); // logs 'this is the first element'
+console.log(arr[1]); // logs 'this is the second element'
+console.log(arr[arr.length - 1]); // logs 'this is the second element'
+</pre>
+
+<p>Gli elementi dell'Array sono proprietà dell'oggetto allo stesso modo che <code>toString</code> è una proprietà, ma provare ad accedere ad un elemento di un array come segue, lancia un errore di sintassi, poichè la proprietà del nome non è valida:</p>
+
+<pre class="brush: js">console.log(arr.0); // a syntax error
+</pre>
+
+<p>Non c'è niente di speciale riguardo gli array JavaScript e la proprietà che causa questo. Le proprietà JavaScript che iniziano con un numero non possono essere referenziate con la notazione punto: e vi si deve accedere usando la notazione parentesi quadre. Per esempio, se si avesse un oggetto con una proprietà chiamata <code>'3d'</code>, la si potrebbe referenziare solamente utilizzando la notazione parentesi quadre. E.g.:</p>
+
+<pre class="brush: js">var years = [1950, 1960, 1970, 1980, 1990, 2000, 2010];
+console.log(years.0); // a syntax error
+console.log(years[0]); // works properly
+</pre>
+
+<pre class="brush: js">renderer.3d.setTexture(model, 'character.png'); // a syntax error
+renderer['3d'].setTexture(model, 'character.png'); // works properly
+</pre>
+
+<p>Notare che nell'esempio <code>3d</code>, <code>'3d'</code> doveva essere messo tra virgolette. E' possibile mettere tra virgolette anche gli indici dell'array JavaScript (e.g., <code>years['2']</code> invece di <code>years[2]</code>), anche se non necessario. Il 2 in <code>years[2]</code> è costretto in una stringa dal motore di JavaScript attraverso una implicita conversione <code>toString</code>. E' per questa ragione che  <code>'2'</code> e <code>'02'</code> riferirebbero a due differenti slot nell'oggetto <code>years</code> ed il seguente esempio potrebbe essere <code>true</code>:</p>
+
+<pre class="brush: js">console.log(years['2'] != years['02']);
+</pre>
+
+<p>Ugualmente, alle proprietà di oggetti che sono parole riservate(!) vi si può accedere come string literals in notazione parentesi quadrate (ma anche in notazione punto a partire dalla versione  40.0a2 di firefox):</p>
+
+<pre><code>var promise = {
+ 'var' : 'text',
+ 'array': [1, 2, 3, 4]
+};
+
+console.log(promise['var']);</code></pre>
+
+<h3 id="Relzione_tra_length_e_proprietà_numeriche">Relzione tra <code>length</code> e proprietà numeriche</h3>
+
+<p>Una proprietà di un array JavaScript {{jsxref("Array.length", "length")}} e proprietà numeriche sono connesse. Molti dei metodi integrati di array(e.g., {{jsxref("Array.join", "join")}}, {{jsxref("Array.slice", "slice")}}, {{jsxref("Array.indexOf", "indexOf")}}, etc.) tengono in conto del valore della proprietà dell'array {{jsxref("Array.length", "length")}} quando sono chiamati. Altri metodi(e.g., {{jsxref("Array.push", "push")}}, {{jsxref("Array.splice", "splice")}}, etc.) risultano nell'aggiornamento della proprietà{{jsxref("Array.length", "length")}} dell'array.</p>
+
+<pre class="brush: js">var fruits = [];
+fruits.push('banana', 'apple', 'peach');
+
+console.log(fruits.length); // 3
+</pre>
+
+<p>Quando si setta una proprietà su un array JavaScript, quando la proprietà è un valido indice di array e quell'iindice è al di fuori dei limiti dell'array, il motore aggiornerà la proprietà {{jsxref("Array.length", "length")}} in accordo:</p>
+
+<pre class="brush: js">fruits[5] = 'mango';
+console.log(fruits[5]); // 'mango'
+console.log(Object.keys(fruits)); // ['0', '1', '2', '5']
+console.log(fruits.length); // 6
+</pre>
+
+<p>Aumentando{{jsxref("Array.length", "length")}}.</p>
+
+<pre class="brush: js">fruits.length = 10;
+console.log(Object.keys(fruits)); // ['0', '1', '2', '5']
+console.log(fruits.length); // 10
+</pre>
+
+<p>Diminuendo la proprietà {{jsxref("Array.length", "length")}}, comunque cancella gli elementi.</p>
+
+<pre class="brush: js">fruits.length = 2;
+console.log(Object.keys(fruits)); // ['0', '1']
+console.log(fruits.length); // 2
+</pre>
+
+<p>La spiegazione è ampliata nella pagina{{jsxref("Array.length")}}.</p>
+
+<h3 id="Creare_un_array_utilizzando_il_risultato_di_un_match">Creare un array utilizzando il risultato di un match</h3>
+
+<p>Il risultato di una corrispondenza tra una espressione regolare e una stringa può creare un array JavaScript. Tale array ha proprietà ed elementi che provvedono informazioni riguardo il match. Questo tipo di array è restituito da {{jsxref("RegExp.exec")}}, {{jsxref("String.match")}}, e {{jsxref("String.replace")}}. Per aiutare a spiegare queste proprietà ed elementi, vedere l'esempio seguente e fare riferimento alla tavola sottostante:</p>
+
+<pre class="brush: js">// Match one d followed by one or more b's followed by one d
+// Remember matched b's and the following d
+// Ignore case
+
+var myRe = /d(b+)(d)/i;
+var myArray = myRe.exec('cdbBdbsbz');
+</pre>
+
+<p>Le proprietà ed elementi restituiti da questo match sono le seguenti:</p>
+
+<table class="fullwidth-table">
+ <tbody>
+ <tr>
+ <td class="header">Property/Element</td>
+ <td class="header">Description</td>
+ <td class="header">Example</td>
+ </tr>
+ <tr>
+ <td><code>input</code></td>
+ <td>Una proprietà read-only che riflette la stinga originale verso la quale l'espressione irregolare era stata abbinata.</td>
+ <td>cdbBdbsbz</td>
+ </tr>
+ <tr>
+ <td><code>index</code></td>
+ <td>Una proprietà read-only su indice base-zeroindex dell'abbinamento nella stringa.</td>
+ <td>1</td>
+ </tr>
+ <tr>
+ <td><code>[0]</code></td>
+ <td>Un elemento read-only che specifica gli ultimi caratteri abbinati.</td>
+ <td>dbBd</td>
+ </tr>
+ <tr>
+ <td><code>[1], ...[n]</code></td>
+ <td>Elementi read-only  che specificano gli abbinamenti di sottostringa in parentesi, se inclusi nella espressione regolare. Il numero di possibili sottostringhe in parentesi è illimitato.</td>
+ <td>[1]: bB<br>
+ [2]: d</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Proprietà">Proprietà</h2>
+
+<dl>
+ <dt><code>Array.length</code></dt>
+ <dd>Il costruttore della proprietà lunghezza  <code>Array</code> il cui valore è 1.</dd>
+ <dt>{{jsxref("Array.@@species", "get Array[@@species]")}}</dt>
+ <dd>La funzione del costruttore che è usata per creare oggetti derivati.</dd>
+ <dt>{{jsxref("Array.prototype")}}</dt>
+ <dd>Permette l'addizione  di proprietà a tutti gli oggetti array.</dd>
+</dl>
+
+<h2 id="Metodi">Metodi</h2>
+
+<dl>
+ <dt>{{jsxref("Array.from()")}} {{experimental_inline}}</dt>
+ <dd>Crea una nuova istanza <code>Array</code> da un oggetto del tipo array o iterabile.</dd>
+ <dt>{{jsxref("Array.isArray()")}}</dt>
+ <dd>Restituisce true se una variabile è un array, altrimenti false.</dd>
+ <dt>{{jsxref("Array.observe()")}} {{experimental_inline}}</dt>
+ <dd>In modo asincrono osserva i cambiamenti agli Arrays, come{{jsxref("Object.observe()")}} per gli oggetti. Provvede un flusso di cambiamenti in ordine di occorrenza.</dd>
+ <dt>{{jsxref("Array.of()")}} {{experimental_inline}}</dt>
+ <dd>Crea una nuova istanza <code>Array</code> con un variabile numero di argomenti, nonostante il numero o i tipi di argomenti.</dd>
+</dl>
+
+<h2 id="Istanze_di_Array">Istanze di<code> Array</code> </h2>
+
+<p>Tutte le istanze di <code>Array</code> ereditano da {{jsxref("Array.prototype")}}. L'oggetto prototype del costruttore <code>Array</code> può essere modificato per influenzare tutte le istanze di  <code>Array</code>.</p>
+
+<h3 id="Proprietà_2">Proprietà</h3>
+
+<div>{{page('/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/prototype', 'Properties')}}</div>
+
+<h3 id="Metodi_2">Metodi</h3>
+
+<h4 id="Metodi_mutatori">Metodi mutatori</h4>
+
+<div>{{page('en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/prototype', 'Mutator_methods')}}</div>
+
+<h4 id="Metodi_per_accedere">Metodi per accedere</h4>
+
+<div>{{page('en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/prototype', 'Accessor_methods')}}</div>
+
+<h4 id="Metodi_di_iterazione">Metodi di iterazione</h4>
+
+<div>{{page('en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/prototype', 'Iteration_methods')}} </div>
+
+<h2 id="Metodi_generici_Array"><code><font face="x-locale-heading-primary, zillaslab, Palatino, Palatino Linotype, x-locale-heading-secondary, serif"><span style="background-color: #ffffff;">Metodi generici </span></font>Array</code> </h2>
+
+<div class="warning">
+<p><strong>Array generics are non-standard, deprecated and will get removed near future</strong>. Note that you can not rely on them cross-browser. However, there is a <a href="https://github.com/plusdude/array-generics">shim available on GitHub</a>.</p>
+</div>
+
+<p>A volte si vorrebbe applicare metodi di array alle stringhe o altri oggetti del tipo array (come {{jsxref("Functions/arguments", "arguments", "", 1)}}). Facendo ciò, si tratta una stringa come un array di caratteri(o altrimenti trattare un non array come array). Per esempio, per controllare che ogni carattere nella variabile <var>str</var> sia una lettera, si scriverebbe:</p>
+
+<pre class="brush: js">function isLetter(character) {
+ return character &gt;= 'a' &amp;&amp; character &lt;= 'z';
+}
+
+if (Array.prototype.every.call(str, isLetter)) {
+ console.log("The string '" + str + "' contains only letters!");
+}
+</pre>
+
+<p>Tale notazione è dispersiva e JavaScript 1.6 ha introdotto un generico shorthand:</p>
+
+<pre class="brush: js">if (Array.every(str, isLetter)) {
+ console.log("The string '" + str + "' contains only letters!");
+}
+</pre>
+
+<p>{{jsxref("Global_Objects/String", "Generics", "#String_generic_methods", 1)}} are also available on {{jsxref("Global_Objects/String", "String")}}.</p>
+
+<p>Queste no fanno parte dello standard ECMAScript (anche se ES2015 {{jsxref("Array.from()")}} può essere utilizzato per raggingere tale scopo). Ciò che segue è un aiuto per permetterene l'utilizzo in tutti i browser:</p>
+
+<pre class="brush: js">// Assumes Array extras already present (one may use polyfills for these as well)
+(function() {
+ 'use strict';
+
+ var i,
+ // We could also build the array of methods with the following, but the
+ // getOwnPropertyNames() method is non-shimable:
+ // Object.getOwnPropertyNames(Array).filter(function(methodName) {
+ // return typeof Array[methodName] === 'function'
+ // });
+ methods = [
+ 'join', 'reverse', 'sort', 'push', 'pop', 'shift', 'unshift',
+ 'splice', 'concat', 'slice', 'indexOf', 'lastIndexOf',
+ 'forEach', 'map', 'reduce', 'reduceRight', 'filter',
+ 'some', 'every', 'find', 'findIndex', 'entries', 'keys',
+  'values', 'copyWithin', 'includes'
+ ],
+ methodCount = methods.length,
+ assignArrayGeneric = function(methodName) {
+ if (!Array[methodName]) {
+ var method = Array.prototype[methodName];
+ if (typeof method === 'function') {
+ Array[methodName] = function() {
+ return method.call.apply(method, arguments);
+ };
+ }
+ }
+ };
+
+ for (i = 0; i &lt; methodCount; i++) {
+ assignArrayGeneric(methods[i]);
+ }
+}());
+</pre>
+
+<h2 id="Esempi">Esempi</h2>
+
+<h3 id="Creare_un_array">Creare un array</h3>
+
+<p>Il seguente esempio crea un array, <code>msgArray</code>, con una lunghezza di 0, poi assegna valori a  <code>msgArray[0]</code> e <code>msgArray[99]</code>, cambiando la lunghezza dell'array a 100.</p>
+
+<pre class="brush: js">var msgArray = [];
+msgArray[0] = 'Hello';
+msgArray[99] = 'world';
+
+if (msgArray.length === 100) {
+ console.log('The length is 100.');
+}
+</pre>
+
+<h3 id="Creare_un_array_bidimensionale">Creare un array bidimensionale</h3>
+
+<p>Ciò che segue crea una scacchiera come un array bidiensionale di stringhe. La prima mossa è fatta copiando la 'p' in (6,4) in (4,4). La vecchia posizione (6,4) è resa bianca.</p>
+
+<pre class="brush: js">var board = [
+ ['R','N','B','Q','K','B','N','R'],
+ ['P','P','P','P','P','P','P','P'],
+ [' ',' ',' ',' ',' ',' ',' ',' '],
+ [' ',' ',' ',' ',' ',' ',' ',' '],
+ [' ',' ',' ',' ',' ',' ',' ',' '],
+ [' ',' ',' ',' ',' ',' ',' ',' '],
+ ['p','p','p','p','p','p','p','p'],
+ ['r','n','b','q','k','b','n','r'] ];
+
+console.log(board.join('\n') + '\n\n');
+
+// Move King's Pawn forward 2
+board[4][4] = board[6][4];
+board[6][4] = ' ';
+console.log(board.join('\n'));
+</pre>
+
+<p>Ecco l'output:</p>
+
+<pre class="eval">R,N,B,Q,K,B,N,R
+P,P,P,P,P,P,P,P
+ , , , , , , ,
+ , , , , , , ,
+ , , , , , , ,
+ , , , , , , ,
+p,p,p,p,p,p,p,p
+r,n,b,q,k,b,n,r
+
+R,N,B,Q,K,B,N,R
+P,P,P,P,P,P,P,P
+ , , , , , , ,
+ , , , , , , ,
+ , , , ,p, , ,
+ , , , , , , ,
+p,p,p,p, ,p,p,p
+r,n,b,q,k,b,n,r
+</pre>
+
+<h2 id="Specificazioni">Specificazioni</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES1')}}</td>
+ <td>{{Spec2('ES1')}}</td>
+ <td>Definizione iniziale.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES5.1', '#sec-15.4', 'Array')}}</td>
+ <td>{{Spec2('ES5.1')}}</td>
+ <td>Nuovi metodi aggiunti: {{jsxref("Array.isArray")}}, {{jsxref("Array.prototype.indexOf", "indexOf")}}, {{jsxref("Array.prototype.lastIndexOf", "lastIndexOf")}}, {{jsxref("Array.prototype.every", "every")}}, {{jsxref("Array.prototype.some", "some")}}, {{jsxref("Array.prototype.forEach", "forEach")}}, {{jsxref("Array.prototype.map", "map")}}, {{jsxref("Array.prototype.filter", "filter")}}, {{jsxref("Array.prototype.reduce", "reduce")}}, {{jsxref("Array.prototype.reduceRight", "reduceRight")}}</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES2015', '#sec-array-objects', 'Array')}}</td>
+ <td>{{Spec2('ES2015')}}</td>
+ <td>Nuovi metodi aggiunti: {{jsxref("Array.from")}}, {{jsxref("Array.of")}}, {{jsxref("Array.prototype.find", "find")}}, {{jsxref("Array.prototype.findIndex", "findIndex")}}, {{jsxref("Array.prototype.fill", "fill")}}, {{jsxref("Array.prototype.copyWithin", "copyWithin")}}</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilità_Browser">Compatibilità Browser </h2>
+
+<div>{{CompatibilityTable}}</div>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android</th>
+ <th>Chrome for Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="Vedere_anche">Vedere anche:</h2>
+
+<ul>
+ <li><a href="/en-US/docs/Web/JavaScript/Guide/Working_with_Objects#Indexing_object_properties">JavaScript Guide: “Indexing object properties”</a></li>
+ <li><a href="/en-US/docs/Web/JavaScript/Guide/Predefined_Core_Objects#Array_Object">JavaScript Guide: “Predefined Core Objects: <code>Array</code> Object”</a></li>
+ <li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Array_comprehensions">Array comprehensions</a></li>
+ <li><a href="https://github.com/plusdude/array-generics">Polyfill for JavaScript 1.8.5 Array Generics and ECMAScript 5 Array Extras</a></li>
+ <li><a href="/en-US/docs/JavaScript_typed_arrays">Typed Arrays</a></li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/indexof/index.html b/files/it/web/javascript/reference/global_objects/array/indexof/index.html
new file mode 100644
index 0000000000..658957c67d
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/indexof/index.html
@@ -0,0 +1,226 @@
+---
+title: Array.prototype.indexOf()
+slug: Web/JavaScript/Reference/Global_Objects/Array/indexOf
+tags:
+ - Array
+ - JavaScript
+ - Prototype
+ - Referenza
+ - metodo
+ - polyfill
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/indexOf
+---
+<div>{{JSRef}}</div>
+
+<p>Il metodo <code><strong>indexOf()</strong></code> restituisce il primo indice in cui è possibile trovare un determinato elemento nell'array o -1 se non è presente.</p>
+
+<div class="note">
+<p><strong>Note:</strong> Per il metodo String, consultare {{jsxref("String.prototype.indexOf()")}}.</p>
+</div>
+
+<div>{{EmbedInteractiveExample("pages/js/array-indexof.html")}}</div>
+
+
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox"><var>arr</var>.indexOf(<var>searchElement[</var>, <var>fromIndex]</var>)</pre>
+
+<h3 id="Parametri">Parametri</h3>
+
+<dl>
+ <dt><code>searchElement</code></dt>
+ <dd>Elemento da localizzare nell'array.</dd>
+ <dt><code>fromIndex</code> {{optional_inline}}</dt>
+ <dd>L'indice per iniziare la ricerca. Se l'indice è maggiore o uguale alla lunghezza dell'array, viene restituito -1, il che significa che l'array non verrà cercato. Se il valore dell'indice fornito è un numero negativo, viene preso come offset dalla fine dell'array. Nota: se l'indice fornito è negativo, l'array viene comunque ricercato da fronte a retro. Se l'indice fornito è 0, verrà cercato l'intero array. Predefinito: 0 (viene cercato l'intero array).</dd>
+</dl>
+
+<h3 id="Valore_di_ritorno">Valore di ritorno</h3>
+
+<p>Il primo indice dell'elemento nell'array; <strong>-1</strong> se non trovato.</p>
+
+<h2 id="Descrizione">Descrizione</h2>
+
+<p><code>indexOf()</code> compara <code>searchElement</code> con gli elementi dell'array usando <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators#Using_the_equality_operators">strict equality</a> (lo stesso metodo utilizzato dall'operatore <code>===</code> o triple-equals).</p>
+
+<h2 id="Esempi">Esempi</h2>
+
+<h3 id="Usare_indexOf()">Usare <code>indexOf()</code></h3>
+
+<p>Nell'esempio seguente viene utilizzato <code>indexOf()</code> per individuare i valori in un array.</p>
+
+<pre class="brush: js">var array = [2, 9, 9];
+array.indexOf(2); // 0
+array.indexOf(7); // -1
+array.indexOf(9, 2); // 2
+array.indexOf(2, -1); // -1
+array.indexOf(2, -3); // 0
+</pre>
+
+<h3 id="Trovare_tutte_le_occorrenze_di_un_elemento">Trovare tutte le occorrenze di un elemento</h3>
+
+<pre class="brush: js">var indices = [];
+var array = ['a', 'b', 'a', 'c', 'a', 'd'];
+var element = 'a';
+var idx = array.indexOf(element);
+while (idx != -1) {
+ indices.push(idx);
+ idx = array.indexOf(element, idx + 1);
+}
+console.log(indices);
+// [0, 2, 4]
+</pre>
+
+<h3 id="Trovare_se_un_elemento_esiste_nell'array_o_meno_ed_aggiornare_l'array">Trovare se un elemento esiste nell'array o meno ed aggiornare l'array</h3>
+
+<pre class="brush: js">function updateVegetablesCollection (veggies, veggie) {
+ if (veggies.indexOf(veggie) === -1) {
+ veggies.push(veggie);
+ console.log('New veggies collection is : ' + veggies);
+ } else if (veggies.indexOf(veggie) &gt; -1) {
+ console.log(veggie + ' already exists in the veggies collection.');
+ }
+}
+
+var veggies = ['potato', 'tomato', 'chillies', 'green-pepper'];
+
+updateVegetablesCollection(veggies, 'spinach');
+// New veggies collection is : potato,tomato,chillies,green-pepper,spinach
+updateVegetablesCollection(veggies, 'spinach');
+// spinach already exists in the veggies collection.
+</pre>
+
+<h2 id="Polyfill">Polyfill</h2>
+
+<p><code>indexOf()</code> è stato aggiunto allo standard ECMA-262 nella quinta edizione; in quanto tale potrebbe non essere presente in tutti i browser. Puoi aggirare questo problema utilizzando il seguente codice all'inizio degli script. Questo ti permetterà di usare <code>indexOf()</code> quando non c'è ancora alcun supporto nativo. Questo algoritmo corrisponde a quello specificato in ECMA-262, 5a edizione, assumendo che {{jsxref("Global_Objects/TypeError", "TypeError")}} e {{jsxref("Math.abs()")}} abbiano i loro valori originali.</p>
+
+<pre class="brush: js">if (!Array.prototype.indexOf) Array.prototype.indexOf = (function(Object, max, min){
+  "use strict";
+ return function indexOf(member, fromIndex) {
+ if(this===null||this===undefined)throw TypeError("Array.prototype.indexOf called on null or undefined");
+
+  var that = Object(this), Len = that.length &gt;&gt;&gt; 0, i = min(fromIndex | 0, Len);
+ if (i &lt; 0) i = max(0, Len+i); else if (i &gt;= Len) return -1;
+
+    if(member===void 0){ for(; i !== Len; ++i) if(that[i]===void 0 &amp;&amp; i in that) return i; // undefined
+    }else if(member !== member){ for(; i !== Len; ++i) if(that[i] !== that[i]) return i; // NaN
+    }else for(; i !== Len; ++i) if(that[i] === member) return i; // all else
+
+ return -1; // if the value was not found, then return -1
+ };
+})(Object, Math.max, Math.min);
+</pre>
+
+<p>Tuttavia, se sei più interessato a tutti i piccoli bit tecnici definiti dallo standard ECMA e meno preoccupati per le prestazioni o la concisione, potresti trovare questo polifratura più descrittivo per essere più utile.</p>
+
+<pre class="brush: js">// Production steps of ECMA-262, Edition 5, 15.4.4.14
+// Reference: http://es5.github.io/#x15.4.4.14
+if (!Array.prototype.indexOf) {
+ Array.prototype.indexOf = function(searchElement, fromIndex) {
+
+ var k;
+
+ // 1. Let o be the result of calling ToObject passing
+ // the this value as the argument.
+ if (this == null) {
+ throw new TypeError('"this" is null or not defined');
+ }
+
+ var o = Object(this);
+
+ // 2. Let lenValue be the result of calling the Get
+ // internal method of o with the argument "length".
+ // 3. Let len be ToUint32(lenValue).
+ var len = o.length &gt;&gt;&gt; 0;
+
+ // 4. If len is 0, return -1.
+ if (len === 0) {
+ return -1;
+ }
+
+ // 5. If argument fromIndex was passed let n be
+ // ToInteger(fromIndex); else let n be 0.
+ var n = fromIndex | 0;
+
+ // 6. If n &gt;= len, return -1.
+ if (n &gt;= len) {
+ return -1;
+ }
+
+ // 7. If n &gt;= 0, then Let k be n.
+ // 8. Else, n&lt;0, Let k be len - abs(n).
+ // If k is less than 0, then let k be 0.
+ k = Math.max(n &gt;= 0 ? n : len - Math.abs(n), 0);
+
+ // 9. Repeat, while k &lt; len
+ while (k &lt; len) {
+ // a. Let Pk be ToString(k).
+ // This is implicit for LHS operands of the in operator
+ // b. Let kPresent be the result of calling the
+ // HasProperty internal method of o with argument Pk.
+ // This step can be combined with c
+ // c. If kPresent is true, then
+ // i. Let elementK be the result of calling the Get
+ // internal method of o with the argument ToString(k).
+ // ii. Let same be the result of applying the
+ // Strict Equality Comparison Algorithm to
+ // searchElement and elementK.
+ // iii. If same is true, return k.
+ if (k in o &amp;&amp; o[k] === searchElement) {
+ return k;
+ }
+ k++;
+ }
+ return -1;
+ };
+}
+</pre>
+
+<h2 id="Specifiche">Specifiche</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specifica</th>
+ <th scope="col">Stato</th>
+ <th scope="col">Commento</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES5.1', '#sec-15.4.4.14', 'Array.prototype.indexOf')}}</td>
+ <td>{{Spec2('ES5.1')}}</td>
+ <td>Definizione iniziale Implementato in JavaScript 1.6.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-array.prototype.indexof', 'Array.prototype.indexOf')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.prototype.indexof', 'Array.prototype.indexOf')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilità_con_i_browser">Compatibilità con i browser</h2>
+
+<div>
+
+
+<p>{{Compat("javascript.builtins.Array.indexOf")}}</p>
+</div>
+
+<h2 id="Note_di_compatibilità">Note di compatibilità</h2>
+
+<ul>
+ <li>A partire da Firefox 47 {{geckoRelease(47)}}, questo metodo non restituirà più <code>-0</code>. Ad esempio, <code>[0].indexOf(0, -0)</code> restituirà sempre <code>+0</code> ({{bug(1242043)}}).</li>
+</ul>
+
+<h2 id="Vedi_anche">Vedi anche</h2>
+
+<ul>
+ <li>{{jsxref("Array.prototype.lastIndexOf()")}}</li>
+ <li>{{jsxref("TypedArray.prototype.indexOf()")}}</li>
+ <li>{{jsxref("String.prototype.indexOf()")}}</li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/isarray/index.html b/files/it/web/javascript/reference/global_objects/array/isarray/index.html
new file mode 100644
index 0000000000..d7aaf864bf
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/isarray/index.html
@@ -0,0 +1,133 @@
+---
+title: Array.isArray()
+slug: Web/JavaScript/Reference/Global_Objects/Array/isArray
+tags:
+ - Array
+ - ECMAScript 5
+ - JavaScript
+ - Referenza
+ - metodo
+ - polyfill
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/isArray
+---
+<div>{{JSRef}}</div>
+
+<p>Il metodo <code><strong>Array.isArray()</strong></code> determina se il valore passato è un {{jsxref("Array")}}.</p>
+
+<pre class="brush: js">Array.isArray([1, 2, 3]); // true
+Array.isArray({foo: 123}); // false
+Array.isArray('foobar'); // false
+Array.isArray(undefined); // false
+</pre>
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox">Array.isArray(<var>value</var>)</pre>
+
+<h3 id="Parametri">Parametri</h3>
+
+<dl>
+ <dt><code>value</code></dt>
+ <dd>Il valore da verificare.</dd>
+</dl>
+
+<h3 id="Valore_di_ritorno">Valore di ritorno</h3>
+
+<p><code>true</code> se il valore è un {{jsxref("Array")}}; altrimenti, <code>false</code>.</p>
+
+<h2 id="Descrizione">Descrizione</h2>
+
+<p>Se il valore è un {{jsxref("Array")}}, viene ritornato <code>true</code>; altrimenti viene ritornato <code>false</code>.</p>
+
+<p>Vedi l'articolo <a href="http://web.mit.edu/jwalden/www/isArray.html">“Determining with absolute accuracy whether or not a JavaScript object is an array”</a> per maggiori dettagli. Data un'istanza {{jsxref("TypedArray")}}, viene ritornato sempre <code>false</code>.</p>
+
+<h2 id="Esempi">Esempi</h2>
+
+<pre class="brush: js">// tutte le seguenti chiamate ritornano true
+Array.isArray([]);
+Array.isArray([1]);
+Array.isArray(new Array());
+Array.isArray(new Array('a', 'b', 'c', 'd'));
+Array.isArray(new Array(3));
+// Fatto poco noto: Array.prototype stesso è un array:
+Array.isArray(Array.prototype);
+
+// tutte le seguenti chiamate ritornano false
+Array.isArray();
+Array.isArray({});
+Array.isArray(null);
+Array.isArray(undefined);
+Array.isArray(17);
+Array.isArray('Array');
+Array.isArray(true);
+Array.isArray(false);
+Array.isArray(new Uint8Array(32));
+Array.isArray({ __proto__: Array.prototype });
+</pre>
+
+<h3 id="instanceof_vs_isArray"><code>instanceof</code> vs <code>isArray</code></h3>
+
+<p>Quando si verifica l'istanza <code>Array</code>, <code>Array.isArray</code> è preferito su <code>instanceof</code> perché funziona attraverso gli <code>iframes</code>.</p>
+
+<pre class="brush: js">var iframe = document.createElement('iframe');
+document.body.appendChild(iframe);
+xArray = window.frames[window.frames.length-1].Array;
+var arr = new xArray(1,2,3); // [1,2,3]
+
+// Verifica corretta dell'array
+Array.isArray(arr); // true
+// Considerato dannoso, perché non funziona attraverso iframe
+arr instanceof Array; // false
+</pre>
+
+<h2 id="Polyfill">Polyfill</h2>
+
+<p>L'esecuzione del seguente codice prima di qualsiasi altro codice creerà <code>Array.isArray()</code> se non è nativamente disponibile.</p>
+
+<pre class="brush: js">if (!Array.isArray) {
+ Array.isArray = function(arg) {
+ return Object.prototype.toString.call(arg) === '[object Array]';
+ };
+}
+</pre>
+
+<h2 id="Specifiche">Specifiche</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specifica</th>
+ <th scope="col">Stato</th>
+ <th scope="col">Commento</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES5.1', '#sec-15.4.3.2', 'Array.isArray')}}</td>
+ <td>{{Spec2('ES5.1')}}</td>
+ <td>Definizione iniziale Implementato in JavaScript 1.8.5.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-array.isarray', 'Array.isArray')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.isarray', 'Array.isArray')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilità_con_i_browser">Compatibilità con i browser</h2>
+
+<div>
+
+
+<p>{{Compat("javascript.builtins.Array.isArray")}}</p>
+</div>
+
+<h2 id="Vedi_anche">Vedi anche</h2>
+
+<ul>
+ <li>{{jsxref("Array")}}</li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/join/index.html b/files/it/web/javascript/reference/global_objects/array/join/index.html
new file mode 100644
index 0000000000..8483c817ac
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/join/index.html
@@ -0,0 +1,112 @@
+---
+title: Array.prototype.join()
+slug: Web/JavaScript/Reference/Global_Objects/Array/join
+tags:
+ - Array
+ - JavaScript
+ - Prototype
+ - Referenza
+ - metodo
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/join
+---
+<div>{{JSRef}}</div>
+
+<p>Il metodo <code><strong>join()</strong></code> unisce tutti gli elementi di un array (o di un <a href="/en-US/docs/Web/JavaScript/Guide/Indexed_collections#Working_with_array-like_objects">array di </a>oggetti) in una stringa che viene restituita.</p>
+
+<pre class="brush: js">var a = ['Wind', 'Rain', 'Fire'];
+a.join(); // 'Wind,Rain,Fire'
+a.join('-'); // 'Wind-Rain-Fire'</pre>
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox"><var>arr</var>.join()
+<var>arr</var>.join(<var>separatore</var>)</pre>
+
+<h3 id="Parametri">Parametri</h3>
+
+<dl>
+ <dt><code>separatore</code> {{optional_inline}}</dt>
+ <dd>Specifica una stringa che separa ogni coppia di elementi adiacenti dell'array. Il separatore è trasformato in una stringa, se necessario. Se omesso, gli elementi dell'array saranno separati da una virgola (","). Se il <code>separatore</code> è una stringa vuota, tutti gli elementi sono uniti senza alcun carattere intemedio.</dd>
+</dl>
+
+<h3 id="Valore_di_risposta">Valore di risposta</h3>
+
+<p>Una stringa con tutti con tutti gli elementi dell'array uniti. Se <code><em>arr</em>.length</code> è <code>0</code>, viene restituita una stringa vuota.</p>
+
+<h2 id="Descrizione">Descrizione</h2>
+
+<p>Le stringe ottenute dalla conversione di tutti gli elementi dell'array sono unite in un unica stringa.</p>
+
+<div class="warning">
+<p>Se un elemento è <code>undefined</code> o <code>null</code>, sarà convertito in una stringa vuota.</p>
+</div>
+
+<h2 id="Esempi">Esempi</h2>
+
+<h3 id="Quattro_modi_per_concatenare_un_array">Quattro modi per concatenare un array</h3>
+
+<p>Il seguente esempio crea un array, <code>a</code>, con tre elementi, quindi unisce gli elementi dell'array quattro volte: usando l'operatore di default, poi una virgola e uno spazio, poi un più e infine una stringa vuota.</p>
+
+<pre class="brush: js">var a = ['Wind', 'Rain', 'Fire'];
+a.join(); // 'Wind,Rain,Fire'
+a.join(', '); // 'Wind, Rain, Fire'
+a.join(' + '); // 'Wind + Rain + Fire'
+a.join(''); // 'WindRainFire'</pre>
+
+<h3 id="Unione_di_un_oggetto_di_tipo_array">Unione di un oggetto di tipo array</h3>
+
+<p>Il seguente esempio unisce un oggetto di tipo array (<code><a href="/en-US/docs/Web/JavaScript/Reference/Functions/arguments">arguments</a></code>), chiamando {{jsxref("Function.prototype.call")}} con <code>Array.prototype.join</code>.</p>
+
+<pre class="brush: js">function f(a, b, c) {
+ var s = Array.prototype.join.call(arguments);
+ console.log(s); // '<span class="message-body-wrapper"><span class="message-flex-body"><span class="devtools-monospace message-body"><span class="objectBox objectBox-string">1,a,true'</span></span></span></span>
+}
+f(1, 'a', true);</pre>
+
+<h2 id="Specifiche">Specifiche</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specifiche</th>
+ <th scope="col">Stato</th>
+ <th scope="col">Commenti</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES1')}}</td>
+ <td>{{Spec2('ES1')}}</td>
+ <td>Definizione iniziale. Implementato in JavaScript 1.1.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES5.1', '#sec-15.4.4.5', 'Array.prototype.join')}}</td>
+ <td>{{Spec2('ES5.1')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-array.prototype.join', 'Array.prototype.join')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.prototype.join', 'Array.prototype.join')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilità_browser">Compatibilità browser</h2>
+
+<div>
+
+
+<p>{{Compat("javascript.builtins.Array.join")}}</p>
+</div>
+
+<h2 id="Guarda_anche">Guarda anche</h2>
+
+<ul>
+ <li>{{jsxref("String.prototype.split()")}}</li>
+ <li>{{jsxref("Array.prototype.toString()")}}</li>
+ <li>{{jsxref("TypedArray.prototype.join()")}}</li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/keys/index.html b/files/it/web/javascript/reference/global_objects/array/keys/index.html
new file mode 100644
index 0000000000..78212d221f
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/keys/index.html
@@ -0,0 +1,74 @@
+---
+title: Array.prototype.keys()
+slug: Web/JavaScript/Reference/Global_Objects/Array/keys
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/keys
+---
+<div>{{JSRef}}</div>
+
+<p>Il metodo <code><strong>keys()</strong></code> ritorna un nuovo oggetto <code><strong>Array Iterator</strong></code> contenente le chiavi di ogni indice dell'array.</p>
+
+<pre class="brush: js">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 }
+</pre>
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox"><var>arr</var>.keys()</pre>
+
+<h3 id="Valore_di_ritorno">Valore di ritorno</h3>
+
+<p>Un nuovo oggetto {{jsxref("Array")}}.</p>
+
+<h2 id="Esempi">Esempi</h2>
+
+<h3 id="I_Key_iterator_non_ignorano_gli_elementi_vuoti">I Key iterator non ignorano gli elementi vuoti</h3>
+
+<pre class="brush: js">var arr = ['a', , 'c'];
+var sparseKeys = Object.keys(arr);
+var denseKeys = [...arr.keys()];
+console.log(sparseKeys); // ['0', '2']
+console.log(denseKeys); // [0, 1, 2]
+</pre>
+
+<h2 id="Specifiche">Specifiche</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specifica</th>
+ <th scope="col">Stato</th>
+ <th scope="col">Commenti</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES2015', '#sec-array.prototype.keys', 'Array.prototype.keys')}}</td>
+ <td>{{Spec2('ES2015')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.prototype.keys', 'Array.prototype.keys')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+<div>
+
+
+<p>{{Compat("javascript.builtins.Array.keys")}}</p>
+</div>
+
+<h2 id="Vedi_anche">Vedi anche</h2>
+
+<ul>
+ <li>{{jsxref("Array.prototype.values()")}}</li>
+ <li>{{jsxref("Array.prototype.entries()")}}</li>
+ <li><a href="/en-US/docs/Web/JavaScript/Reference/Iteration_protocols">Iteration protocols</a></li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/lastindexof/index.html b/files/it/web/javascript/reference/global_objects/array/lastindexof/index.html
new file mode 100644
index 0000000000..c4170455f6
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/lastindexof/index.html
@@ -0,0 +1,169 @@
+---
+title: Array.prototype.lastIndexOf()
+slug: Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf
+tags:
+ - Array
+ - ECMAScript 5
+ - JavaScript
+ - Protototipo
+ - Prototype
+ - metodo
+ - polyfill
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf
+---
+<div>{{JSRef}}</div>
+
+<p>Il metodo <code><strong>lastIndexOf()</strong></code> ritorna l'ultimo indice nel quale l'elemento dato può essere trovato nell' array, o -1 se non presente. L'array verrà controllato al contrario, partendo da <code>fromIndex</code>.</p>
+
+<div>{{EmbedInteractiveExample("pages/js/array-lastindexof.html")}}</div>
+
+<p class="hidden">Il codice sorgere per questo esempio interattivo è conservato all' interno di una repository di GitHub. Se vuoi contribuire all progetto di esempi interattivi, perfavore clona <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a> e inviaci una pull request.</p>
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox"><var>arr</var>.lastIndexOf(<var>searchElement</var>)
+<var>arr</var>.lastIndexOf(<var>searchElement</var>, <var>fromIndex</var>)
+</pre>
+
+<h3 id="Parametri">Parametri</h3>
+
+<dl>
+ <dt><code>searchElement</code></dt>
+ <dd>Elemento da trovare nell' array.</dd>
+ <dt><code>fromIndex</code> {{optional_inline}}</dt>
+ <dd>L'indice da cui iniziare a cercare al contrario. Di defaults la lunghezza dell' array meno uno (<code>arr.length - 1</code>), quindi cercherà in tutto l'array. Se l'indice è uguale o maggiore alla lunghezza dell' array, l' elemento sarà cercato in tutto l'array. Se negativo, Verrà preso come offset dalla fine dell' array. Nota che anche se l'indice è negativo, l'array sarà controllato comunque al contrario. ISe l'indice calcolato è minore di 0, verrà ritornato -1, quindi non verrà effettuata la ricerca.</dd>
+</dl>
+
+<h3 id="Valori_restituiti">Valori restituiti</h3>
+
+<p>L'ultimo indice dell' elemento nell' array; <strong>-1</strong> se non trovato.</p>
+
+<h2 id="Descrizione">Descrizione</h2>
+
+<p><code>lastIndexOf</code> compara <code>searchElement</code> a gli elementi dell' array usando <a href="/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators#Using_the_Equality_Operators">strict equality</a> (lo stesso metodo usato ===, o triple-equals, operator).</p>
+
+<h2 id="Esempi">Esempi</h2>
+
+<h3 id="Utilizzo_di_lastIndexOf">Utilizzo di <code>lastIndexOf</code></h3>
+
+<p>L'esempio seguente usa <code>lastIndexOf</code> per trovare i valori in un array.</p>
+
+<pre class="brush: js">var numbers = [2, 5, 9, 2];
+numbers.lastIndexOf(2); // 3
+numbers.lastIndexOf(7); // -1
+numbers.lastIndexOf(2, 3); // 3
+numbers.lastIndexOf(2, 2); // 0
+numbers.lastIndexOf(2, -2); // 0
+numbers.lastIndexOf(2, -1); // 3
+</pre>
+
+<h3 id="Trovare_tutte_le_posizioni_di_un_elemento">Trovare tutte le posizioni di un elemento</h3>
+
+<p>Il seguente esempio usa <code>lastIndexOf</code> per trovare tutti gli elementi nell' array, usando {{jsxref("Array.prototype.push", "push")}} per essere aggiunti in un array come vengono trovati.</p>
+
+<pre class="brush: js">var indices = [];
+var array = ['a', 'b', 'a', 'c', 'a', 'd'];
+var element = 'a';
+var idx = array.lastIndexOf(element);
+while (idx != -1) {
+ indices.push(idx);
+ idx = (idx &gt; 0 ? array.lastIndexOf(element, idx - 1) : -1);
+}
+
+console.log(indices);
+// [4, 2, 0]
+</pre>
+
+<p>Nota che non abbiamo considerato <code>idx == 0</code>perchè l'elemento sarà sempre troavto indipendemente da <code>il parametro fromIndex</code> se è il primo elemento dell'array. TQuesto è diveso dal metodo {{jsxref("Array.prototype.indexOf", "indexOf")}}.</p>
+
+<h2 id="Polyfill">Polyfill</h2>
+
+<p><code>lastIndexOf</code> è stato aggiunto nello standard ECMA-262 nella 5° edizione; come può non essere trovato in altre implementazioni nello standard. Puoi aggirare questa cosa inserendo il seguente codice all' inizio del tuo script, permettendoti di usare <code>lastIndexOf</code> anche se non supportato nativamente.Questo algorittmo è esattamente quello descritto da ECMA-262, 5° edizione, assumendo{{jsxref("Object")}}, {{jsxref("TypeError")}}, {{jsxref("Number")}}, {{jsxref("Math.floor")}}, {{jsxref("Math.abs")}}, e {{jsxref("Math.min")}} abbiano il loro valore originale.</p>
+
+<pre class="brush: js">// Production steps of ECMA-262, Edition 5, 15.4.4.15
+// Reference: http://es5.github.io/#x15.4.4.15
+if (!Array.prototype.lastIndexOf) {
+ Array.prototype.lastIndexOf = function(searchElement /*, fromIndex*/) {
+ 'use strict';
+
+ if (this === void 0 || this === null) {
+ throw new TypeError();
+ }
+
+ var n, k,
+ t = Object(this),
+ len = t.length &gt;&gt;&gt; 0;
+ if (len === 0) {
+ return -1;
+ }
+
+ n = len - 1;
+ if (arguments.length &gt; 1) {
+ n = Number(arguments[1]);
+ if (n != n) {
+ n = 0;
+ }
+ else if (n != 0 &amp;&amp; n != (1 / 0) &amp;&amp; n != -(1 / 0)) {
+ n = (n &gt; 0 || -1) * Math.floor(Math.abs(n));
+ }
+ }
+
+ for (k = n &gt;= 0 ? Math.min(n, len - 1) : len - Math.abs(n); k &gt;= 0; k--) {
+ if (k in t &amp;&amp; t[k] === searchElement) {
+ return k;
+ }
+ }
+ return -1;
+ };
+}
+</pre>
+
+<p>Ancora, nota che questa implementazione mira alla compatibilità assoluta con <code>lastIndexOf</code> in Firefox e SpiderMonkey JavaScript engine, includendo alcuni casi che sono considerati estremi. ISe hai intenzione di usare questo in applicazioni reali, potresti calcolare <code>from</code> con un codice meno complicato se ignori questi casi.</p>
+
+<h2 id="Descrizione_2">Descrizione</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Descrizione</th>
+ <th scope="col">Stato</th>
+ <th scope="col">Commento</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES5.1', '#sec-15.4.4.15', 'Array.prototype.lastIndexOf')}}</td>
+ <td>{{Spec2('ES5.1')}}</td>
+ <td>Definizione iniziale. Implementato in JavaScript 1.6.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-array.prototype.lastindexof', 'Array.prototype.lastIndexOf')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.prototype.lastindexof', 'Array.prototype.lastIndexOf')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilità_con_il_browser">Compatibilità con il browser</h2>
+
+<div>
+<div class="hidden">La tabella della compatibilità in questa pagina è stata generata da strutture dati. Se vorresti contribuire  ai dati, perfavore da un' occhiata a <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> e inviaci una pull request.</div>
+
+<p>{{Compat("javascript.builtins.Array.lastIndexOf")}}</p>
+</div>
+
+<h2 id="Note_di_compatibilità">Note di compatibilità</h2>
+
+<ul>
+ <li>Partendo da Firefox 47 {{geckoRelease(47)}},  <code>questo metodo non restituirà più -0</code>. Per esempio, <code>[0].lastIndexOf(0, -0)</code> Ora restituirà sempre <code>+0</code> ({{bug(1242043)}}).</li>
+</ul>
+
+<h2 id="Guarda_anche">Guarda anche</h2>
+
+<ul>
+ <li>{{jsxref("Array.prototype.indexOf()")}}</li>
+ <li>{{jsxref("TypedArray.prototype.lastIndexOf()")}}</li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/length/index.html b/files/it/web/javascript/reference/global_objects/array/length/index.html
new file mode 100644
index 0000000000..a36a6b5204
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/length/index.html
@@ -0,0 +1,129 @@
+---
+title: Array.length
+slug: Web/JavaScript/Reference/Global_Objects/Array/length
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/length
+---
+<div>{{JSRef}}</div>
+
+<div>La proprieta' <strong>length</strong> setta o restituisce il numero di elementi in un array. E' un intero a 32 bit, sempre maggiore del piu' grande indice dell'array.</div>
+
+<div> </div>
+
+<pre class="brush: js">var items = ['shoes', 'shirts', 'socks', 'sweaters'];
+items.length;
+
+// returns 4</pre>
+
+<h2 id="Descrizione">Descrizione</h2>
+
+<p>Puoi impostare la proprietà <strong>length</strong> di un array per troncare o estendere l'array stesso.</p>
+
+<pre class="brush: js">var a = [1,2,3];
+a.length=2;
+// a is now [1, 2]
+
+a.length = 10
+// a is now [1, 2, undefined × 8]
+</pre>
+
+<h3 id="sect1"> </h3>
+
+<h2 id="Esempi">Esempi</h2>
+
+<h3 id="Iterare_su_un_array">Iterare su un array</h3>
+
+<p>Nel seguente esempio, l'array <em>numbers</em> viene iterarato e ciascun elemento viene moltiplicato per 2.</p>
+
+<pre class="brush: js">var numbers = [1, 2, 3, 4, 5];
+var length = numbers.length;
+for (var i = 0; i &lt; length; i++) {
+ numbers[i] *= 2;
+}
+// numbers is now [2, 4, 6, 8, 10]
+</pre>
+
+<h3 id="Specifiche">Specifiche</h3>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specifiche</th>
+ <th scope="col">Stato</th>
+ <th scope="col">Commento</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES1')}}</td>
+ <td>{{Spec2('ES1')}}</td>
+ <td>Definizione iniziale.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES5.1', '#sec-15.4.5.2', 'Array.length')}}</td>
+ <td>{{Spec2('ES5.1')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-properties-of-array-instances-length', 'Array.length')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-properties-of-array-instances-length', 'Array.length')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilità">Compatibilità</h2>
+
+<div>{{CompatibilityTable}}</div>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android</th>
+ <th>Chrome for Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="sect2"> </h2>
diff --git a/files/it/web/javascript/reference/global_objects/array/map/index.html b/files/it/web/javascript/reference/global_objects/array/map/index.html
new file mode 100644
index 0000000000..808b4fc728
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/map/index.html
@@ -0,0 +1,323 @@
+---
+title: Array.prototype.map()
+slug: Web/JavaScript/Reference/Global_Objects/Array/map
+tags:
+ - Array
+ - ECMAScript 5
+ - JavaScript
+ - Prototype
+ - Referenza
+ - metodo
+ - polyfill
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/map
+---
+<div>{{JSRef}}</div>
+
+<p>Il metodo <code><strong>map()</strong></code> crea un nuovo array con i risultati della chiamata di una funzione fornita su ogni elemento dell'array chiamante.</p>
+
+<div>{{EmbedInteractiveExample("pages/js/array-map.html")}}</div>
+
+<p class="hidden">The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a> and send us a pull request." </p>
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox"><var>var new_array = arr</var>.map(function <var>callback(currentValue[, index[, array]]) {
+ </var>// Ritorna un elemento per new_array<var>
+}</var>[, <var>thisArg</var>])</pre>
+
+<h3 id="Parametri">Parametri</h3>
+
+<dl>
+ <dt><code>callback</code></dt>
+ <dd>Funzione che produce un elemento del nuovo array, prendendo tre argomenti:
+ <dl>
+ <dt> </dt>
+ <dt><code>currentValue</code></dt>
+ <dd>L'elemento corrente in elaborazione nell'array.</dd>
+ <dt><code>index</code>{{optional_inline}}</dt>
+ <dd>L'indice dell'elemento corrente in elaborazione nell'array.</dd>
+ <dt><code>array</code>{{optional_inline}}</dt>
+ <dd>L'array a cui viene applicato <code>map</code>.</dd>
+ </dl>
+ </dd>
+ <dt><code>thisArg</code>{{optional_inline}}</dt>
+ <dd>Valore da utilizzare come <code>this</code> quando viene eseguito <code>callback</code>.</dd>
+</dl>
+
+<h3 id="Valore_di_ritorno">Valore di ritorno</h3>
+
+<p>Un nuovo array con ciascun elemento che è il risultato della funzione di callback.</p>
+
+<h2 id="Descrizione">Descrizione</h2>
+
+<p><code>map</code> chiama il <code>callback</code> fornito <strong>una volta per ciascun elemento</strong> in un array, in ordine, e costruisce un nuovo array dai risultati. <code>callback</code> viene invocato solo per gli indici dell'array che hanno valori assegnati, incluso <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>. Non viene chiamato per gli elementi mancanti dell'array (ovvero, gli indici che non sono mai stati impostati, che sono stati cancellati o a cui non è mai stato assegnato un valore).</p>
+
+<p>Poichè <code>map</code> costruisce un nuovo array, usarlo quando non si utilizza l'array restituito è un anti-pattern; usa <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach"><code>forEach</code></a> o <code><a href="/en-US/docs/Web/JavaScript/Reference/Statements/for...of">for-of</a></code> invece. Segni che non dovresti usare map: A) Non stai usando l'array restituito, e/o B) Non stai restituendo un valore dal callback.</p>
+
+<p><code>callback</code> viene invocato con tre argomenti: il valore dell'elemento, l'indice dell'elemento e l'oggetto Array che viene iterato.</p>
+
+<p>Se viene fornito il parametro <code>thisArg</code> a <code>map</code>, verrà utilizzato come valore <code>this</code> del callback. Altrimenti, il valore {{jsxref("undefined")}} sarà usato come valore <code>this</code>. Il valore <code>this</code> alla fine osservabile da <code>callback</code> è determinato secondo <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this">le consuete regole per determinare il <code>this</code> visto da una funzione</a>.</p>
+
+<p><code>map</code> non muta l'array su cui è chiamato (sebbene <code>callback</code>, se invocato, possa farlo).</p>
+
+<p>L'intervallo di elementi elaborati da <code>map</code> viene impostato prima della prima chiamata del <code>callback</code>. Gli elementi aggiunti all'array dopo che la chiamata a <code>map</code> inizia non saranno calcolati da <code>callback</code>. Se i valori degli elementi esistenti dell'array vengono modificati, il valore passato a <code>callback</code> sarà il valore al momento in cui <code>map</code> li visita. Gli elementi che vengono cancellati dopo che la chiamata a <code>map</code> inizia e prima di essere visitati non vengono visitati.</p>
+
+<p>A causa dell'algoritmo definito nella specifica, se l'array su cui è stata chiamato <code>map</code> è sparso, l'array risultante sarà sparso, mantenendo vuoti gli stessi indici.</p>
+
+<h2 id="Esempi">Esempi</h2>
+
+<h3 id="Mappare_una_serie_di_numeri_ad_un_array_di_radici_quadrate">Mappare una serie di numeri ad un array di radici quadrate</h3>
+
+<p>Il seguente codice accetta un array di numeri e crea un nuovo array contenente le radici quadrate dei numeri nel primo array.</p>
+
+<pre class="brush: js">var numbers = [1, 4, 9];
+var roots = numbers.map(function(num) {
+return Math.sqrt(num)
+});
+// roots è ora [1, 2, 3]
+// numbers è ancora [1, 4, 9]
+</pre>
+
+<h3 id="Usare_map_per_riformattare_gli_oggetti_in_un_array">Usare <code>map</code> per riformattare gli oggetti in un array</h3>
+
+<p>Il seguente codice accetta un array di oggetti e crea un nuovo array contenente gli oggetti appena riformattati.</p>
+
+<pre class="brush: js">var kvArray = [{key: 1, value: 10},
+               {key: 2, value: 20},
+               {key: 3, value: 30}];
+
+var reformattedArray = kvArray.map(obj =&gt;{
+   var rObj = {};
+   rObj[obj.key] = obj.value;
+   return rObj;
+});
+// reformattedArray è ora [{1: 10}, {2: 20}, {3: 30}],
+
+// kvArray è ancora:
+// [{key: 1, value: 10},
+// {key: 2, value: 20},
+// {key: 3, value: 30}]
+</pre>
+
+<h3 id="Mappare_un_array_di_numeri_usando_una_funzione_che_contiene_un_argomento">Mappare un array di numeri usando una funzione che contiene un argomento</h3>
+
+<p>Il codice seguente mostra come funziona <code>map</code> quando viene utilizzata una funzione che richiede un argomento. L'argomento verrà assegnato automaticamente da ciascun elemento dell'array mentre <code>map</code> itera l'array originale.</p>
+
+<pre class="brush: js">var numbers = [1, 4, 9];
+var doubles = numbers.map(function(num) {
+ return num * 2;
+});
+
+// doubles is now [2, 8, 18]
+// numbers is still [1, 4, 9]
+</pre>
+
+<h3 id="Usare_map_genericamente">Usare <code>map</code> genericamente</h3>
+
+<p>Questo esempio mostra come usare map su una {{jsxref("String")}} per ottenere un array di byte nella codifica ASCII che rappresenta i valori dei caratteri:</p>
+
+<pre class="brush: js">var a = Array.prototype.map.call('Hello World', function(x) {
+ return x.charCodeAt(0);
+});
+// a ora equivale a [72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100]
+</pre>
+
+<h3 id="Usare_map_con_querySelectorAll">Usare <code>map</code> con <code>querySelectorAll</code></h3>
+
+<p>Questo esempio mostra come iterare attraverso una raccolta di oggetti raccolti da <code>querySelectorAll</code>. Questo perchè <code>querySelectorAll</code> restituisce una <em><strong>NodeList</strong></em> che è una raccolta di oggetti.<br>
+ In questo caso restituiamo sullo schermo tutti i valori delle opzioni selezionate:</p>
+
+<pre class="brush: js">var elems = document.querySelectorAll('select option:checked');
+var values = Array.prototype.map.call(elems, function(obj) {
+ return obj.value;
+});
+</pre>
+
+<p>Il modo più semplice sarebbe utilizzare il metodo {{jsxref("Array.from()")}}.</p>
+
+<h3 id="Caso_d'uso_ingannevole">Caso d'uso ingannevole</h3>
+
+<p><a href="http://www.wirfs-brock.com/allen/posts/166">(inspired by this blog post)</a></p>
+
+<p>È normale utilizzare il callback con un argomento (l'elemento che viene attraversato). Alcune funzioni sono anche comunemente utilizzate con un argomento, anche se accettano argomenti opzionali aggiuntivi. Queste abitudini possono portare a comportamenti confusi.</p>
+
+<pre class="brush: js" dir="rtl">// Consider:
+['1', '2', '3'].map(parseInt);
+// Mentre ci si potrebbe aspettare [1, 2, 3]
+// Il risultato effettivo è [1, NaN, NaN]
+
+// parseInt è spesso usato con un argomento, ma ne prende due.
+// Il primo è un'espressione e il secondo è la radice.
+// Alla funzione di callback, Array.prototype.map passa 3 argomenti:
+// l'elemento, l'indice e l'array
+// Il terzo argomento è ignorato da parseInt, ma non il secondo,
+// da qui l'eventuale confusione. Vedi il post del blog per maggiori dettagli
+// Se il link non funziona
+// ecco un esempio conciso dei passaggi di iterazione:
+// parseInt(string, radix) -&gt; map(parseInt(value, index))
+// first iteration (index is 0): parseInt('1', 0) // results in parseInt('1', 0) -&gt; 1
+// second iteration (index is 1): parseInt('2', 1) // results in parseInt('2', 1) -&gt; NaN
+// third iteration (index is 2): parseInt('3', 2) // results in parseInt('3', 2) -&gt; NaN
+
+function returnInt(element) {
+ return parseInt(element, 10);
+}
+
+['1', '2', '3'].map(returnInt); // [1, 2, 3]
+// Il risultato effettivo è un array di numeri (come previsto)
+
+// Come sopra, ma usando la sintassi della funzione a freccia concisa
+['1', '2', '3'].map( str =&gt; parseInt(str) );
+
+// Un modo più semplice per ottenere quanto sopra, evitando il "gotcha":
+['1', '2', '3'].map(Number); // [1, 2, 3]
+// ma a differenza di `parseInt` restituirà anche una notazione esponenziale mobile o (risolta):
+['1.1', '2.2e2', '3e300'].map(Number); // [1.1, 220, 3e+300]
+</pre>
+
+<p>Un output alternativo del metodo map che viene chiamato con parseInt come parametro viene eseguito come segue:</p>
+
+<pre class="brush: js">var xs = ['10', '10', '10'];
+
+xs = xs.map(parseInt);
+
+console.log(xs);
+// Il risultato effettivo di 10,NaN,2 potrebbe essere inaspettato in base alla descrizione precedente.</pre>
+
+<h2 id="Polyfill">Polyfill</h2>
+
+<p><code>map</code> è stato aggiunto allo standard ECMA-262 nella 5a edizione; in quanto tale potrebbe non essere presente in tutte le implementazioni dello standard. Puoi aggirare questo problema inserendo il seguente codice all'inizio degli script, consentendo l'uso di <code>map</code> in implementazioni che non lo supportano in modo nativo. Questo algoritmo è esattamente quello specificato in ECMA-262, 5a edizione, assumendo {{jsxref("Object")}}, {{jsxref("TypeError")}}, e {{jsxref("Array")}} hanno i loro valori originali e che <code>callback.call</code> restituisce il valore originale di <code>{{jsxref("Function.prototype.call")}}</code>.</p>
+
+<pre class="brush: js">// Production steps of ECMA-262, Edition 5, 15.4.4.19
+// Reference: http://es5.github.io/#x15.4.4.19
+if (!Array.prototype.map) {
+
+ Array.prototype.map = function(callback/*, thisArg*/) {
+
+ var T, A, k;
+
+ if (this == null) {
+ throw new TypeError('this is null or not defined');
+ }
+
+ // 1. Let O be the result of calling ToObject passing the |this|
+ // value as the argument.
+ var O = Object(this);
+
+ // 2. Let lenValue be the result of calling the Get internal
+ // method of O with the argument "length".
+ // 3. Let len be ToUint32(lenValue).
+ var len = O.length &gt;&gt;&gt; 0;
+
+ // 4. If IsCallable(callback) is false, throw a TypeError exception.
+ // See: http://es5.github.com/#x9.11
+ if (typeof callback !== 'function') {
+ throw new TypeError(callback + ' is not a function');
+ }
+
+ // 5. If thisArg was supplied, let T be thisArg; else let T be undefined.
+ if (arguments.length &gt; 1) {
+ T = arguments[1];
+ }
+
+ // 6. Let A be a new array created as if by the expression new Array(len)
+ // where Array is the standard built-in constructor with that name and
+ // len is the value of len.
+ A = new Array(len);
+
+ // 7. Let k be 0
+ k = 0;
+
+ // 8. Repeat, while k &lt; len
+ while (k &lt; len) {
+
+ var kValue, mappedValue;
+
+ // a. Let Pk be ToString(k).
+ // This is implicit for LHS operands of the in operator
+ // b. Let kPresent be the result of calling the HasProperty internal
+ // method of O with argument Pk.
+ // This step can be combined with c
+ // c. If kPresent is true, then
+ if (k in O) {
+
+ // i. Let kValue be the result of calling the Get internal
+ // method of O with argument Pk.
+ kValue = O[k];
+
+ // ii. Let mappedValue be the result of calling the Call internal
+ // method of callback with T as the this value and argument
+ // list containing kValue, k, and O.
+ mappedValue = callback.call(T, kValue, k, O);
+
+ // iii. Call the DefineOwnProperty internal method of A with arguments
+ // Pk, Property Descriptor
+ // { Value: mappedValue,
+ // Writable: true,
+ // Enumerable: true,
+ // Configurable: true },
+ // and false.
+
+ // In browsers that support Object.defineProperty, use the following:
+ // Object.defineProperty(A, k, {
+ // value: mappedValue,
+ // writable: true,
+ // enumerable: true,
+ // configurable: true
+ // });
+
+ // For best browser support, use the following:
+ A[k] = mappedValue;
+ }
+ // d. Increase k by 1.
+ k++;
+ }
+
+ // 9. return A
+ return A;
+ };
+}
+</pre>
+
+<h2 id="Specifiche">Specifiche</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specifica</th>
+ <th scope="col">Stato</th>
+ <th scope="col">Commento</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES5.1', '#sec-15.4.4.19', 'Array.prototype.map')}}</td>
+ <td>{{Spec2('ES5.1')}}</td>
+ <td>Definizione iniziale Implementato in JavaScript 1.6.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-array.prototype.map', 'Array.prototype.map')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.prototype.map', 'Array.prototype.map')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilità_con_i_browser">Compatibilità con i browser</h2>
+
+<div>
+
+
+<p>{{Compat("javascript.builtins.Array.map")}}</p>
+</div>
+
+<h2 id="Vedi_anche">Vedi anche</h2>
+
+<ul>
+ <li>{{jsxref("Array.prototype.forEach()")}}</li>
+ <li>L'oggetto {{jsxref("Map")}}</li>
+ <li>{{jsxref("Array.from()")}}</li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/of/index.html b/files/it/web/javascript/reference/global_objects/array/of/index.html
new file mode 100644
index 0000000000..808c1dda2c
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/of/index.html
@@ -0,0 +1,92 @@
+---
+title: Array.of()
+slug: Web/JavaScript/Reference/Global_Objects/Array/of
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/of
+---
+<div>{{JSRef}}</div>
+
+<p>Il metodo <code><strong>Array.of()</strong></code> crea una nuova istanza di <code>Array</code>  accettando un numero variabile di argomenti, indipendentemente dal numero o dal tipo degli argomenti.</p>
+
+<p>La differenza tra <code><strong>Array.of()</strong></code> ed il costruttore <code><strong>Array</strong></code> è nella gestione degli argomenti di tipo intero: <code><strong>Array.of(7)</strong></code> crea un array con un singolo elemento, <code>7</code>, mentre <code><strong>Array(7)</strong></code> crea un array vuoto con la proprietà <code>length</code> settata a  7 (<strong>Nota:</strong> questo implica un array di <code>7</code> elementi vuoti, non elementi col valore <code>undefined</code> assegnato).</p>
+
+<pre class="brush: js">Array.of(7); // [7]
+Array.of(1, 2, 3); // [1, 2, 3]
+
+Array(7); // [ , , , , , , ]
+Array(1, 2, 3); // [1, 2, 3]
+</pre>
+
+<h2 id="Syntax">Syntax</h2>
+
+<pre class="syntaxbox">Array.of(<var>element0</var>[, <var>element1</var>[, ...[, <var>elementN</var>]]])</pre>
+
+<h3 id="Parameteri">Parameteri</h3>
+
+<dl>
+ <dt><code>element<em>N</em></code></dt>
+ <dd>Gli elementi da assegnare all'array.</dd>
+</dl>
+
+<h3 id="Valore_di_ritorno">Valore di ritorno</h3>
+
+<p>Una nuova istanz di {{jsxref("Array")}}.</p>
+
+<h2 id="Descrizione">Descrizione</h2>
+
+<p>Questa funzione fa parte dello standard ECMAScript 2015. Per maggiori informazioni vedi le proposal <a href="https://gist.github.com/rwaldron/1074126"><code>Array.of</code> e <code>Array.from</code> </a> e il polyfill <a href="https://gist.github.com/rwaldron/3186576"><code>Array.of</code></a>.</p>
+
+<h2 id="Esempi">Esempi</h2>
+
+<pre class="brush: js">Array.of(1); // [1]
+Array.of(1, 2, 3); // [1, 2, 3]
+Array.of(undefined); // [undefined]
+</pre>
+
+<h2 id="Polyfill">Polyfill</h2>
+
+<p>Eseguendo il codice seguente prima di qualsiasi altro codice verrà creato il metodo <code>Array.of()</code> se non era precedentemente esistente.</p>
+
+<pre class="brush: js">if (!Array.of) {
+ Array.of = function() {
+ return Array.prototype.slice.call(arguments);
+ };
+}
+</pre>
+
+<h2 id="Specifiche">Specifiche</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specifica</th>
+ <th scope="col">Stato</th>
+ <th scope="col">Commenti</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES2015', '#sec-array.of', 'Array.of')}}</td>
+ <td>{{Spec2('ES2015')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.of', 'Array.of')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+<div>
+
+
+<p>{{Compat("javascript.builtins.Array.of")}}</p>
+</div>
+
+<h2 id="Vedi_anche">Vedi anche</h2>
+
+<ul>
+ <li>{{jsxref("Array")}}</li>
+ <li>{{jsxref("Array.from()")}}</li>
+ <li>{{jsxref("TypedArray.of()")}}</li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/pop/index.html b/files/it/web/javascript/reference/global_objects/array/pop/index.html
new file mode 100644
index 0000000000..6feabb5f14
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/pop/index.html
@@ -0,0 +1,117 @@
+---
+title: Array.prototype.pop()
+slug: Web/JavaScript/Reference/Global_Objects/Array/pop
+tags:
+ - Array
+ - JavaScript
+ - Prototype
+ - Referenza
+ - metodo
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/pop
+---
+<div>{{JSRef}}</div>
+
+<p>Il metodo <code><strong>pop()</strong></code> rimuove <strong>l'ultimo</strong> elemento da un array e restituisce quell'elemento. Questo metodo modifica la lunghezza dell'array.</p>
+
+<div>{{EmbedInteractiveExample("pages/js/array-pop.html")}}</div>
+
+
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox"><var>arr</var>.pop()</pre>
+
+<h3 id="Valore_di_ritorno">Valore di ritorno</h3>
+
+<p>L'elemento rimosso dall'array; {{jsxref("undefined")}} se l'array è vuoto.</p>
+
+<h2 id="Descrizione">Descrizione</h2>
+
+<p>Il metodo <code>pop</code> rimuove l'ultimo elemento da un array e restituisce quel valore al chiamante.</p>
+
+<p><code>pop</code> è intenzionalmente generico; questo metodo può essere {{jsxref("Function.call", "chiamato", "", 1)}} o {{jsxref("Function.apply", "applicato", "", 1)}} ad oggetti che assomigliano agli array. Gli oggetti che non contengono una proprietà <code>length</code> che riflette l'ultimo di una serie di proprietà numeriche consecutive basate su zero potrebbero non comportarsi in alcun modo significativo.</p>
+
+<p>Se chiami <code>pop()</code> su un array vuoto, ritorna {{jsxref("undefined")}}.</p>
+
+<p>{{jsxref("Array.prototype.shift()")}} ha un comportamento simile a <code>pop</code>, ma applicato al primo elemento di un array.</p>
+
+<h2 id="Esempi">Esempi</h2>
+
+<h3 id="Rimozione_dell'ultimo_elemento_di_un_array">Rimozione dell'ultimo elemento di un array</h3>
+
+<p>Il seguente codice crea l'array <code>myFish</code> contenente quattro elementi, dopo rimuove il suo ultimo elemento.</p>
+
+<pre class="brush: js">var myFish = ['angel', 'clown', 'mandarin', 'sturgeon'];
+
+var popped = myFish.pop();
+
+console.log(myFish); // ['angel', 'clown', 'mandarin' ]
+
+console.log(popped); // 'sturgeon'</pre>
+
+
+
+<h3 id="Usare_apply(_)_o_call_(_)_sugli_array-like_objects">Usare apply( ) o call ( ) sugli array-like objects</h3>
+
+<p>Il codice seguente crea l'array-like object <code>myFish</code> contenente quattro elementi e un parametro length, poi rimuove il suo ultimo elemento e decrementa il parametro length.</p>
+
+<pre class="brush: js">var myFish = {0:'angel', 1:'clown', 2:'mandarin', 3:'sturgeon', length: 4};
+
+var popped = Array.prototype.pop.call(myFish); //same syntax for using apply( )
+
+console.log(myFish); // {0:'angel', 1:'clown', 2:'mandarin', length: 3}
+
+console.log(popped); // 'sturgeon'
+</pre>
+
+
+
+<h2 id="Specifiche">Specifiche</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specifica</th>
+ <th scope="col">Stato</th>
+ <th scope="col">Commento</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES3')}}</td>
+ <td>{{Spec2('ES3')}}</td>
+ <td>Definizione iniziale Implementato in JavaScript 1.2.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES5.1', '#sec-15.4.4.6', 'Array.prototype.pop')}}</td>
+ <td>{{Spec2('ES5.1')}}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-array.prototype.pop', 'Array.prototype.pop')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.prototype.pop', 'Array.prototype.pop')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilità_con_i_browser">Compatibilità con i browser</h2>
+
+<div>
+
+
+<p>{{Compat("javascript.builtins.Array.pop")}}</p>
+</div>
+
+<h2 id="Vedi_anche">Vedi anche</h2>
+
+<ul>
+ <li>{{jsxref("Array.prototype.push()")}}</li>
+ <li>{{jsxref("Array.prototype.shift()")}}</li>
+ <li>{{jsxref("Array.prototype.unshift()")}}</li>
+ <li>{{jsxref("Array.prototype.concat()")}}</li>
+ <li>{{jsxref("Array.prototype.splice()")}}</li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/prototype/index.html b/files/it/web/javascript/reference/global_objects/array/prototype/index.html
new file mode 100644
index 0000000000..d4989792a8
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/prototype/index.html
@@ -0,0 +1,203 @@
+---
+title: Array.prototype
+slug: Web/JavaScript/Reference/Global_Objects/Array/prototype
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/prototype
+---
+<div>{{JSRef}}</div>
+
+<p>La proprietà <strong><code>Array.prototype</code></strong> rappresenta il prototipo per il costruttore {{jsxref("Array")}} .</p>
+
+<div>{{js_property_attributes(0, 0, 0)}}</div>
+
+<h2 id="Description" name="Description">Descrizione</h2>
+
+<p>Le istanze {{jsxref("Array")}} ereditano da <code>Array.prototype</code>. Come con gli altri costruttori, si può cambiare il prototipo propagando i cambiamenti su tutte le sue istanze.</p>
+
+<p>Piccola curiosità: <code>Array.prototype</code> è un {{jsxref("Array")}}:</p>
+
+<pre class="brush: js">Array.isArray(Array.prototype); // true
+</pre>
+
+<h2 id="Properties" name="Properties">Proprietà</h2>
+
+<dl>
+ <dt><code>Array.prototype.constructor</code></dt>
+ <dd>Restituisce il costruttore.</dd>
+ <dt>{{jsxref("Array.prototype.length")}}</dt>
+ <dd>Restituisce il numero di elementi in un array.</dd>
+</dl>
+
+<h2 id="Methods" name="Methods">Metodi</h2>
+
+<h3 id="Mutator_methods" name="Mutator_methods">Metodi mutator</h3>
+
+<p>Questi metodi modificano l'array:</p>
+
+<dl>
+ <dt>{{jsxref("Array.prototype.copyWithin()")}} {{experimental_inline}}</dt>
+ <dd>Copia una sequenza di elementi dell'array all'interno dello stesso.</dd>
+ <dt>{{jsxref("Array.prototype.fill()")}} {{experimental_inline}}</dt>
+ <dd>Riempie le posizioni dell'array contenute tra 2 indici con un valore fisso.</dd>
+ <dt>{{jsxref("Array.prototype.pop()")}}</dt>
+ <dd>Rimuove e restituisce l'ultimo elemento dell'array.</dd>
+ <dt>{{jsxref("Array.prototype.push()")}}</dt>
+ <dd>Accoda uno o più elementi all'array e restituisce la lunghezza aggiornata dello stesso.</dd>
+ <dt>{{jsxref("Array.prototype.reverse()")}}</dt>
+ <dd>Inverte l'ordine delle posizioni degli elementi all'interno dell'array.</dd>
+ <dt>{{jsxref("Array.prototype.shift()")}}</dt>
+ <dd>Rimuove e resistuisce il primo elemento di un array.</dd>
+ <dt>{{jsxref("Array.prototype.sort()")}}</dt>
+ <dd>Ordina gli elementi di un array all'interno di esso e restituisce l'array.</dd>
+ <dt>{{jsxref("Array.prototype.splice()")}}</dt>
+ <dd>Aggiunge e/o rimuove elementi da un array.</dd>
+ <dt>{{jsxref("Array.prototype.unshift()")}}</dt>
+ <dd>Aggiunge uno o più elementi all'inizio di un array e restituisce la lunghezza aggiornata dello stesso.</dd>
+</dl>
+
+<h3 id="Accessor_methods" name="Accessor_methods">Metodi accessor</h3>
+
+<p>Questi metodi non modificano l'array e ne restituiscono una sua rappresentazione.</p>
+
+<dl>
+ <dt>{{jsxref("Array.prototype.concat()")}}</dt>
+ <dd>Restituisce un nuovo array costituito dall'array stesso insieme ad altri array/valori.</dd>
+ <dt>{{jsxref("Array.prototype.includes()")}} {{experimental_inline}}</dt>
+ <dd>Restituisce <code>true</code> se l'array contiene un certo elemento, <code>false</code> altrimenti.</dd>
+ <dt>{{jsxref("Array.prototype.join()")}}</dt>
+ <dd>Resituisce i valori dell'array come stringa.</dd>
+ <dt>{{jsxref("Array.prototype.slice()")}}</dt>
+ <dd>Restituisce un nuovo array cosituito da elementi dell'array originale.</dd>
+ <dt>{{jsxref("Array.prototype.toSource()")}} {{non-standard_inline}}</dt>
+ <dd>Returns an array literal representing the specified array; you can use this value to create a new array. Overrides the {{jsxref("Object.prototype.toSource()")}} method.</dd>
+ <dt>{{jsxref("Array.prototype.toString()")}}</dt>
+ <dd>Returns a string representing the array and its elements. Overrides the {{jsxref("Object.prototype.toString()")}} method.</dd>
+ <dt>{{jsxref("Array.prototype.toLocaleString()")}}</dt>
+ <dd>Returns a localized string representing the array and its elements. Overrides the {{jsxref("Object.prototype.toLocaleString()")}} method.</dd>
+ <dt>{{jsxref("Array.prototype.indexOf()")}}</dt>
+ <dd>Returns the first (least) index of an element within the array equal to the specified value, or -1 if none is found.</dd>
+ <dt>{{jsxref("Array.prototype.lastIndexOf()")}}</dt>
+ <dd>Returns the last (greatest) index of an element within the array equal to the specified value, or -1 if none is found.</dd>
+</dl>
+
+<h3 id="Iteration_methods" name="Iteration_methods">Iteration methods</h3>
+
+<p>Several methods take as arguments functions to be called back while processing the array. When these methods are called, the <code>length</code> of the array is sampled, and any element added beyond this length from within the callback is not visited. Other changes to the array (setting the value of or deleting an element) may affect the results of the operation if the method visits the changed element afterwards. While the specific behavior of these methods in such cases is well-defined, you should not rely upon it so as not to confuse others who might read your code. If you must mutate the array, copy into a new array instead.</p>
+
+<dl>
+ <dt>{{jsxref("Array.prototype.forEach()")}}</dt>
+ <dd>Calls a function for each element in the array.</dd>
+ <dt>{{jsxref("Array.prototype.entries()")}} {{experimental_inline}}</dt>
+ <dd>Returns a new <code>Array Iterator</code> object that contains the key/value pairs for each index in the array.</dd>
+ <dt>{{jsxref("Array.prototype.every()")}}</dt>
+ <dd>Returns true if every element in this array satisfies the provided testing function.</dd>
+ <dt>{{jsxref("Array.prototype.some()")}}</dt>
+ <dd>Returns true if at least one element in this array satisfies the provided testing function.</dd>
+ <dt>{{jsxref("Array.prototype.filter()")}}</dt>
+ <dd>Creates a new array with all of the elements of this array for which the provided filtering function returns true.</dd>
+ <dt>{{jsxref("Array.prototype.find()")}} {{experimental_inline}}</dt>
+ <dd>Returns the found value in the array, if an element in the array satisfies the provided testing function or <code>undefined</code> if not found.</dd>
+ <dt>{{jsxref("Array.prototype.findIndex()")}} {{experimental_inline}}</dt>
+ <dd>Returns the found index in the array, if an element in the array satisfies the provided testing function or -1 if not found.</dd>
+ <dt>{{jsxref("Array.prototype.keys()")}} {{experimental_inline}}</dt>
+ <dd>Returns a new <code>Array Iterator</code> that contains the keys for each index in the array.</dd>
+ <dt>{{jsxref("Array.prototype.map()")}}</dt>
+ <dd>Creates a new array with the results of calling a provided function on every element in this array.</dd>
+ <dt>{{jsxref("Array.prototype.reduce()")}}</dt>
+ <dd>Apply a function against an accumulator and each value of the array (from left-to-right) as to reduce it to a single value.</dd>
+ <dt>{{jsxref("Array.prototype.reduceRight()")}}</dt>
+ <dd>Apply a function against an accumulator and each value of the array (from right-to-left) as to reduce it to a single value.</dd>
+ <dt>{{jsxref("Array.prototype.values()")}} {{experimental_inline}}</dt>
+ <dd>Returns a new <code>Array Iterator</code> object that contains the values for each index in the array.</dd>
+ <dt>{{jsxref("Array.prototype.@@iterator()", "Array.prototype[@@iterator]()")}} {{experimental_inline}}</dt>
+ <dd>Returns a new <code>Array Iterator</code> object that contains the values for each index in the array.</dd>
+</dl>
+
+<h3 id="Generic_methods" name="Generic_methods">Generic methods</h3>
+
+<p>Many methods on the JavaScript Array object are designed to be generally applied to all objects which “look like” Arrays. That is, they can be used on any object which has a <code>length</code> property, and which can usefully be accessed using numeric property names (as with <code>array[5]</code> indexing). <span class="comment">TODO: give examples with Array.prototype.forEach.call, and adding the method to an object like {{jsxref("Global_Objects/JavaArray", "JavaArray")}} or {{jsxref("Global_Objects/String", "String")}}.</span> Some methods, such as {{jsxref("Array.join", "join")}}, only read the <code>length</code> and numeric properties of the object they are called on. Others, like {{jsxref("Array.reverse", "reverse")}}, require that the object's numeric properties and <code>length</code> be mutable; these methods can therefore not be called on objects like {{jsxref("String")}}, which does not permit its <code>length</code> property or synthesized numeric properties to be set.</p>
+
+<h2 id="Specifications" name="Specifications">Specifications</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES1')}}</td>
+ <td>{{Spec2('ES1')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES5.1', '#sec-15.4.3.1', 'Array.prototype')}}</td>
+ <td>{{Spec2('ES5.1')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-array.prototype', 'Array.prototype')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility" name="Browser_compatibility">Browser compatibility</h2>
+
+<div>{{CompatibilityTable}}</div>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android</th>
+ <th>Chrome for Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="See_also" name="See_also">See also</h2>
+
+<ul>
+ <li>{{jsxref("Array")}}</li>
+ <li>{{jsxref("Function.prototype")}}</li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/push/index.html b/files/it/web/javascript/reference/global_objects/array/push/index.html
new file mode 100644
index 0000000000..ad34c3da2d
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/push/index.html
@@ -0,0 +1,142 @@
+---
+title: Array.prototype.push()
+slug: Web/JavaScript/Reference/Global_Objects/Array/push
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/push
+---
+<div>{{JSRef}}</div>
+
+<p>Il metodo <code><strong>push()</strong></code> aggiunge uno o più elementi alla fine di un array e ne restituisce la nuova lunghezza.</p>
+
+<pre class="brush: js notranslate">var numbers = [1, 2, 3];
+numbers.push(4);
+
+console.log(numbers); // [1, 2, 3, 4]
+
+numbers.push(5, 6, 7);
+
+console.log(numbers); // [1, 2, 3, 4, 5, 6, 7]
+</pre>
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox notranslate"><var>arr</var>.push([<var>elemento1</var>[, ...[, <var>elementoN</var>]]])</pre>
+
+<h3 id="Parametri">Parametri</h3>
+
+<dl>
+ <dt><code>elemento<em>N</em></code></dt>
+ <dd>Gli elementi da aggiungere alla fine dell'array.</dd>
+</dl>
+
+<h3 id="Valore_di_ritorno">Valore di ritorno</h3>
+
+<p>La nuova proprietà {{jsxref("Array.length", "length")}} dell'oggetto su cui è stato richiamato il metodo.</p>
+
+<h2 id="Descrizione">Descrizione</h2>
+
+<p>Il metodo <code>push</code> aggiunge valori all'array.</p>
+
+<p><code>push</code> è intenzionalmente generico. Questo metodo può essere utilizzato con {{jsxref("Function.call", "call()")}} o {{jsxref("Function.apply", "apply()")}} su oggetti che assomigliano a un array. Il metodo<code>push</code> si basa sulla proprietà <code>length</code> per determinare da dove iniziare l'inserimento dei valori indicati. Se la proprietà <code>length</code> non può essere convertita in un numero, l'indice utilizzato è 0. Ciò include la possibilità che <code>length</code> sia inesistente, in tale caso <code>length</code> verrà creata.</p>
+
+<p>Gli unici oggetti nativi simili agli array sono {{jsxref("Global_Objects/String", "strings", "", 1)}}, anche se non adatti alle applicazioni di questo metodo, in quanto le stringhe sono immutabili.</p>
+
+<h2 id="Esempi">Esempi</h2>
+
+<h3 id="Aggiungere_elementi_a_un_array">Aggiungere elementi a un array</h3>
+
+<p>Il seguente codice crea l'array <code>sports</code> che contiene due elementi, poi aggiunge ulteriori due elementi allo stesso. La variabile <code>total</code> contiene la nuova lunghezza dell'array.</p>
+
+<pre class="brush: js notranslate">var sports = ['calcio', 'baseball'];
+var total = sports.push('football americano', 'nuoto');
+
+console.log(sports); // ['calcio', 'baseball', 'football americano', 'nuoto']
+console.log(total); // 4
+</pre>
+
+<h3 id="Unire_due_arrays">Unire due arrays</h3>
+
+<p>Questo esempio utilizza {{jsxref("Function.apply", "apply()")}} per aggiungere tutti gli elementi da un secondo array.</p>
+
+<p><em>Non</em> utilizzare questo metodo se il secondo array (<code>moreVegs</code> in questo esempio) è molto grande, perché il numero massimo di parametri che una funzione può assumere è limitato nella pratica. Vedere {{jsxref("Function.apply", "apply()")}} per ulteriori dettagli.</p>
+
+<pre class="brush: js notranslate">var vegetables = ['pastinaca', 'patata'];
+var moreVegs = ['sedano', 'barbabietola'];
+
+// Unire il secondo array nel primo
+// Equivalente a vegetables.push('sedano', 'barbabietola');
+Array.prototype.push.apply(vegetables, moreVegs);
+
+console.log(vegetables); // ['pastinaca', 'patata', 'sedano', 'barbabietola']
+</pre>
+
+<h3 id="Utilizzo_di_un_oggetto_come_un_array">Utilizzo di un oggetto come un array</h3>
+
+<p>Come accennato in precedenza, <code>push</code> è intenzionalmente generica e possiamo usarla a nostro vantaggio. <code>Array.prototype.push</code> può funzionare benissimo su un oggetto, come mostra questo esempio. Si noti che non creiamo un array per memorizzare la raccolta di oggetti. Al contrario, memorizziamo la raccolta sull'oggetto stesso e utilizziamo <code>call</code> su <code>Array.prototype.push</code> per ingannare il metodo e fargli pensare che siamo di fronte a un array, e funziona solo grazie al modo in cui JavaScript ci permette di stabilire il contesto di esecuzione come preferiamo.</p>
+
+<pre class="brush: js notranslate">var obj = {
+ length: 0,
+
+ addElem: function addElem(elem) {
+ // obj.length viene automaticamente incrementato
+ // ogni volta che viene aggiunto un elemento.
+ [].push.call(this, elem);
+ }
+};
+
+// Aggiungiamo alcuni oggetti vuoti solo per illustrare.
+obj.addElem({});
+obj.addElem({});
+console.log(obj.length);
+// → 2
+</pre>
+
+<p>Si noti che anche se <code>obj</code> non è un array, il metodo <code>push</code> ha incrementato la proprietà di <code>length</code> di<code>obj</code> come se si trattasse di un array vero e proprio.</p>
+
+<h2 id="Specificazioni">Specificazioni</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specificazione</th>
+ <th scope="col">Stato</th>
+ <th scope="col">Commento</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES3')}}</td>
+ <td>{{Spec2('ES3')}}</td>
+ <td>Definizione iniziale. Implementato in JavaScript 1.2.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES5.1', '#sec-15.4.4.7', 'Array.prototype.push')}}</td>
+ <td>{{Spec2('ES5.1')}}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-array.prototype.push', 'Array.prototype.push')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.prototype.push', 'Array.prototype.push')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilità_di_Browser">Compatibilità di Browser</h2>
+
+<div>
+<div class="hidden">La tabella di compatibilità di questa pagina viene generata da dati strutturati. Se desideri contribuire ai dati, controlla <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> e invia una pull request.</div>
+
+<p>{{Compat("javascript.builtins.Array.push")}}</p>
+</div>
+
+<h2 id="Guarda_anche">Guarda anche</h2>
+
+<ul>
+ <li>{{jsxref("Array.prototype.pop()")}}</li>
+ <li>{{jsxref("Array.prototype.shift()")}}</li>
+ <li>{{jsxref("Array.prototype.unshift()")}}</li>
+ <li>{{jsxref("Array.prototype.concat()")}}</li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/reduce/index.html b/files/it/web/javascript/reference/global_objects/array/reduce/index.html
new file mode 100644
index 0000000000..de063df929
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/reduce/index.html
@@ -0,0 +1,576 @@
+---
+title: Array.prototype.reduce()
+slug: Web/JavaScript/Reference/Global_Objects/Array/Reduce
+tags:
+ - Array
+ - Array method
+ - ECMAScript 5
+ - JavaScript
+ - Method
+ - Prototype
+ - Reduce
+ - Referenza
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/Reduce
+---
+<div>{{JSRef}}</div>
+
+<p>Il metodo <code><strong>reduce()</strong></code> esegue una funzione <strong>reducer</strong> (che tu fornisci) su ogni elemento dell'array, risultante in un unico output.</p>
+
+<div>{{EmbedInteractiveExample("pages/js/array-reduce.html")}}</div>
+
+<div>I sorgenti per questo esempio interattivo è disponibile su un repository GitHub. Se desideri contribuire al progetto, clona <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a> e inviaci una pull request.</div>
+
+<p>La funzione <strong>reducer</strong> accetta quattro argomenti:</p>
+
+<ol>
+ <li>Accumulatore (acc)</li>
+ <li>Valore corrente (cur)</li>
+ <li>Indice corrente (idx)</li>
+ <li>Array sul quale viene eseguito il metodo (src)</li>
+</ol>
+
+<p>Il valore restituito della funzione <strong>reducer</strong> viene assegnato all'accumulatore, il cui valore viene memorizzato attraverso ogni iterazione nell'intero array e in definitiva, diventa il valore finale finale singolo.</p>
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox notranslate"><var>arr.reduce(callback(accumulator, currentValue[, index[, array]]) [, initialValue])</var></pre>
+
+<h3 id="Parametri">Parametri</h3>
+
+<dl>
+ <dt><code>callback</code></dt>
+ <dd>Una funzione da eseguire su ogni elemento dell'array (tranne il primo, se non viene fornita <code>initialValue</code>), accetta 4 argomenti:
+ <dl>
+ <dt><code>accumulator</code></dt>
+ <dd>L'accumulatore accumula i valori di ritorno del callback. È il valore accumulato precedentemente restituito nell'ultima chiamata del callback o <code>initialValue</code>, se fornito (vedere di seguito).</dd>
+ <dt><code>currentValue</code></dt>
+ <dd>L'elemento corrente in elaborazione nell'array.</dd>
+ <dt><code>index</code> {{optional_inline}}</dt>
+ <dd>L'indice dell'elemento corrente in elaborazione nell'array. Inizia dall'indice 0 se viene fornito <code>initialValue</code> Altrimenti, inizia dall'indice 1.</dd>
+ <dt><code>array</code> {{optional_inline}}</dt>
+ <dd>L'array a cui viene applicato <code>reduce()</code>.</dd>
+ </dl>
+ </dd>
+ <dt><code>initialValue</code> {{optional_inline}}</dt>
+ <dd>Un valore da utilizzare come primo argomento della prima chiamata del <code>callback</code>. Se non viene fornito <code>initialValue</code> il primo elemento dell'array verrà utilizzato e saltato. Chiamare <code>reduce()</code> su un array vuoto senza <code>initialValue</code> genererà un <code>TypeError</code>.</dd>
+</dl>
+
+<h3 id="Valore_di_ritorno">Valore di ritorno</h3>
+
+<p>Il singolo valore che risulta dalla riduzione.</p>
+
+<h2 id="Descrizione">Descrizione</h2>
+
+<p>Il metodo <code>reduce()</code> esegue il <code>callback</code> una volta per ogni valore assegnato presente nell'array, prendendo quattro argomenti:</p>
+
+<ul>
+ <li><code>accumulator</code></li>
+ <li><code>currentValue</code></li>
+ <li><code>currentIndex</code></li>
+ <li><code>array</code></li>
+</ul>
+
+<p>La prima volta che viene chiamato il callback, <code>accumulator</code> e <code>currentValue</code> possono essere uno dei due valori. Se <code>initialValue</code> viene fornito nella chiamata a <code>reduce()</code>, <code>accumulator</code> sarà uguale a <code>initialValue</code>, e <code>currentValue</code> sarà uguale al primo valore nell'array. Se non viene fornito alcun valore <code>initialValue</code>, <code>accumulator</code> sarà uguale al primo valore dell'array e <code>currentValue</code> sarà uguale al secondo.</p>
+
+<div class="note">
+<p><strong>Note:</strong> Se non viene fornito <code>initialValue</code>, <code>reduce()</code> eseguirà la funzione di callback a partire dall'indice 1, saltando il primo indice. Se viene fornito <code>initialValue</code>, inizierà dall'indice 0.</p>
+</div>
+
+<p>Se l'array è vuoto e non viene fornito <code>initialValue</code> verrà generato un {{jsxref("TypeError")}}. Se l'array ha solo un elemento (indipendentemente dalla posizione) e non viene fornito <code>initialValue</code>, o se è fornito <code>initialValue</code> ma l'array è vuoto, il valore solo verrà restituito <em>senza</em> chiamare <em><code>callback</code>.</em></p>
+
+<p>Di solito è più sicuro fornire <code>initialValue</code> perché ci sono tre output possibili senza <code>initialValue</code>, come mostrato nell'esempio seguente.</p>
+
+<pre class="brush: js notranslate">var maxCallback = ( acc, cur ) =&gt; Math.max( acc.x, cur.x );
+var maxCallback2 = ( max, cur ) =&gt; Math.max( max, cur );
+
+// reduce() without initialValue
+[ { x: 22 }, { x: 42 } ].reduce( maxCallback ); // 42
+[ { x: 22 } ].reduce( maxCallback ); // { x: 22 }
+[ ].reduce( maxCallback ); // TypeError
+
+// map/reduce; better solution, also works for empty or larger arrays
+[ { x: 22 }, { x: 42 } ].map( el =&gt; el.x )
+ .reduce( maxCallback2, -Infinity );
+</pre>
+
+<h3 id="Come_funziona_reduce">Come funziona reduce()</h3>
+
+<p>Supponiamo che si sia verificato il seguente uso di <code>reduce()</code>:</p>
+
+<pre class="brush: js notranslate">[0, 1, 2, 3, 4].reduce(function(accumulator, currentValue, currentIndex, array) {
+ return accumulator + currentValue;
+});
+</pre>
+
+<p>Il callback verrebbe invocato quattro volte, con gli argomenti e i valori restituiti in ogni chiamata come segue:</p>
+
+<table>
+ <thead>
+ <tr>
+ <th scope="col"><code>callback</code></th>
+ <th scope="col"><code>accumulator</code></th>
+ <th scope="col"><code>currentValue</code></th>
+ <th scope="col"><code>currentIndex</code></th>
+ <th scope="col"><code>array</code></th>
+ <th scope="col">valore ritornato</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <th scope="row">prima chiamata</th>
+ <td><code>0</code></td>
+ <td><code>1</code></td>
+ <td>1</td>
+ <td><code>[0, 1, 2, 3, 4]</code></td>
+ <td><code>1</code></td>
+ </tr>
+ <tr>
+ <th scope="row">seconda chiamata</th>
+ <td><code>1</code></td>
+ <td><code>2</code></td>
+ <td>2</td>
+ <td><code>[0, 1, 2, 3, 4]</code></td>
+ <td><code>3</code></td>
+ </tr>
+ <tr>
+ <th scope="row">terza chiamata</th>
+ <td><code>3</code></td>
+ <td><code>3</code></td>
+ <td>3</td>
+ <td><code>[0, 1, 2, 3, 4]</code></td>
+ <td><code>6</code></td>
+ </tr>
+ <tr>
+ <th scope="row">quarta chiamata</th>
+ <td><code>6</code></td>
+ <td><code>4</code></td>
+ <td>4</td>
+ <td><code>[0, 1, 2, 3, 4]</code></td>
+ <td><code>10</code></td>
+ </tr>
+ </tbody>
+</table>
+
+<p>Il valore restituito da <code>reduce()</code> sarà quello dell'ultima chiamata del callback (<code>10</code>).</p>
+
+<p>È inoltre possibile fornire una {{jsxref("Functions/Arrow_functions", "Arrow Function","",1)}} al posto di una funzione completa. Il seguente codice produrrà lo stesso output del codice nel blocco sopra riportato:</p>
+
+<pre class="brush: js notranslate">[0, 1, 2, 3, 4].reduce( (accumulator, currentValue, currentIndex, array) =&gt; accumulator + currentValue );
+</pre>
+
+<p>Se dovessi fornire <code>initialValue</code> come secondo argomento a <code>reduce()</code>, il risultato sarebbe simile a questo:</p>
+
+<pre class="brush: js notranslate">[0, 1, 2, 3, 4].reduce((accumulator, currentValue, currentIndex, array) =&gt; {
+ return accumulator + currentValue;
+}, 10);
+</pre>
+
+<table>
+ <thead>
+ <tr>
+ <th scope="col"><code>callback</code></th>
+ <th scope="col"><code>accumulator</code></th>
+ <th scope="col"><code>currentValue</code></th>
+ <th scope="col"><code>currentIndex</code></th>
+ <th scope="col"><code>array</code></th>
+ <th scope="col">valore restituito</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <th scope="row">prima chiamata</th>
+ <td><code>10</code></td>
+ <td><code>0</code></td>
+ <td><code>0</code></td>
+ <td><code>[0, 1, 2, 3, 4]</code></td>
+ <td><code>10</code></td>
+ </tr>
+ <tr>
+ <th scope="row">seconda chiamata</th>
+ <td><code>10</code></td>
+ <td><code>1</code></td>
+ <td><code>1</code></td>
+ <td><code>[0, 1, 2, 3, 4]</code></td>
+ <td><code>11</code></td>
+ </tr>
+ <tr>
+ <th scope="row">terza chiamata</th>
+ <td><code>11</code></td>
+ <td><code>2</code></td>
+ <td><code>2</code></td>
+ <td><code>[0, 1, 2, 3, 4]</code></td>
+ <td><code>13</code></td>
+ </tr>
+ <tr>
+ <th scope="row">quarta chiamata</th>
+ <td><code>13</code></td>
+ <td><code>3</code></td>
+ <td><code>3</code></td>
+ <td><code>[0, 1, 2, 3, 4]</code></td>
+ <td><code>16</code></td>
+ </tr>
+ <tr>
+ <th scope="row">quinta chiamata</th>
+ <td><code>16</code></td>
+ <td><code>4</code></td>
+ <td><code>4</code></td>
+ <td><code>[0, 1, 2, 3, 4]</code></td>
+ <td><code>20</code></td>
+ </tr>
+ </tbody>
+</table>
+
+<p>Il valore restituito da <code>reduce()</code> in questo caso sarebbe <code>20</code>.</p>
+
+<h2 id="Esempi">Esempi</h2>
+
+<h3 id="Sommare_tutti_i_valori_di_un_array">Sommare tutti i valori di un array</h3>
+
+<pre class="brush: js notranslate">var sum = [0, 1, 2, 3].reduce(function (accumulator, currentValue) {
+ return accumulator + currentValue;
+}, 0);
+// sum è 6
+
+</pre>
+
+<p>In alternativa scritto con una arrow function:</p>
+
+<pre class="brush: js notranslate">var total = [ 0, 1, 2, 3 ].reduce(
+ ( accumulator, currentValue ) =&gt; accumulator + currentValue,
+ 0
+);</pre>
+
+<h3 id="Somma_dei_valori_in_un_array_di_oggetti">Somma dei valori in un array di oggetti</h3>
+
+<p>Per riassumere i valori contenuti in un array di oggetti, <strong>devi</strong> fornire <code>initialValue</code>, in modo che ogni elemento passi attraverso la tua funzione</p>
+
+<pre class="brush: js notranslate">var initialValue = 0;
+var sum = [{x: 1}, {x: 2}, {x: 3}].reduce(function (accumulator, currentValue) {
+ return accumulator + currentValue.x;
+},initialValue)
+
+console.log(sum) // logs 6
+</pre>
+
+<p>In alternativa scritto con una arrow function:</p>
+
+<pre class="brush: js notranslate">var initialValue = 0;
+var sum = [{x: 1}, {x: 2}, {x: 3}].reduce(
+ (accumulator, currentValue) =&gt; accumulator + currentValue.x
+ ,initialValue
+);
+
+console.log(sum) // logs 6</pre>
+
+<h3 id="Appiattire_una_serie_di_array">Appiattire una serie di array</h3>
+
+<pre class="brush: js notranslate">var flattened = [[0, 1], [2, 3], [4, 5]].reduce(
+ function(accumulator, currentValue) {
+ return accumulator.concat(currentValue);
+ },
+ []
+);
+// flattened is [0, 1, 2, 3, 4, 5]
+</pre>
+
+<p>In alternativa scritto con una arrow function:</p>
+
+<pre class="brush: js notranslate">var flattened = [[0, 1], [2, 3], [4, 5]].reduce(
+ ( accumulator, currentValue ) =&gt; accumulator.concat(currentValue),
+ []
+);
+</pre>
+
+<h3 id="Conteggio_delle_istanze_di_valori_in_un_oggetto">Conteggio delle istanze di valori in un oggetto</h3>
+
+<pre class="brush: js notranslate">var names = ['Alice', 'Bob', 'Tiff', 'Bruce', 'Alice'];
+
+var countedNames = names.reduce(function (allNames, name) {
+ if (name in allNames) {
+ allNames[name]++;
+ }
+ else {
+ allNames[name] = 1;
+ }
+ return allNames;
+}, {});
+// countedNames is:
+// { 'Alice': 2, 'Bob': 1, 'Tiff': 1, 'Bruce': 1 }
+</pre>
+
+<h3 id="Raggruppamento_di_oggetti_in_base_a_una_proprietà">Raggruppamento di oggetti in base a una proprietà</h3>
+
+<pre class="brush: js notranslate">var people = [
+ { name: 'Alice', age: 21 },
+ { name: 'Max', age: 20 },
+ { name: 'Jane', age: 20 }
+];
+
+function groupBy(objectArray, property) {
+ return objectArray.reduce(function (acc, obj) {
+ var key = obj[property];
+ if (!acc[key]) {
+ acc[key] = [];
+ }
+ acc[key].push(obj);
+ return acc;
+ }, {});
+}
+
+var groupedPeople = groupBy(people, 'age');
+// groupedPeople is:
+// {
+// 20: [
+// { name: 'Max', age: 20 },
+// { name: 'Jane', age: 20 }
+// ],
+// 21: [{ name: 'Alice', age: 21 }]
+// }
+</pre>
+
+<h3 id="Array_di_legame_contenuti_in_una_serie_di_oggetti_che_utilizzano_lo_spread_operator_e_initialValue">Array di legame contenuti in una serie di oggetti che utilizzano lo spread operator e initialValue</h3>
+
+<pre class="brush: js notranslate">// friends - an array of objects
+// where object field "books" - list of favorite books
+var friends = [{
+ name: 'Anna',
+ books: ['Bible', 'Harry Potter'],
+ age: 21
+}, {
+ name: 'Bob',
+ books: ['War and peace', 'Romeo and Juliet'],
+ age: 26
+}, {
+ name: 'Alice',
+ books: ['The Lord of the Rings', 'The Shining'],
+ age: 18
+}];
+
+// allbooks - list which will contain all friends' books +
+// additional list contained in initialValue
+var allbooks = friends.reduce(function(accumulator, currentValue) {
+ return [...accumulator, ...currentValue.books];
+}, ['Alphabet']);
+
+// allbooks = [
+// 'Alphabet', 'Bible', 'Harry Potter', 'War and peace',
+// 'Romeo and Juliet', 'The Lord of the Rings',
+// 'The Shining'
+// ]</pre>
+
+<h3 id="Rimuovi_gli_elementi_duplicati_nellarray">Rimuovi gli elementi duplicati nell'array</h3>
+
+<div class="blockIndicator note">
+<p><strong>Note:</strong> Se si utilizza un ambiente compatibile con {{jsxref("Set")}} e {{jsxref("Array.from()")}}, è possibile utilizzare <code>let orderedArray = Array.from(new Set(myArray));</code> per ottenere un array in cui sono stati rimossi gli elementi duplicati.</p>
+</div>
+
+<pre class="brush: js notranslate">var myArray = ['a', 'b', 'a', 'b', 'c', 'e', 'e', 'c', 'd', 'd', 'd', 'd'];
+var myOrderedArray = myArray.reduce(function (accumulator, currentValue) {
+ if (accumulator.indexOf(currentValue) === -1) {
+ accumulator.push(currentValue);
+ }
+ return accumulator
+}, [])
+
+console.log(myOrderedArray);</pre>
+
+<h3 id="Eseguire_le_Promises_in_Sequenza">Eseguire le Promises in Sequenza</h3>
+
+<pre class="brush: js notranslate">/**
+ * Esegue promises da un array di funzioni che possono restituire promises
+ * in modo concatenato
+ *
+ * @param {array} arr - promise arr
+ * @return {Object} promise object
+ */
+function runPromiseInSequence(arr, input) {
+ return arr.reduce(
+ (promiseChain, currentFunction) =&gt; promiseChain.then(currentFunction),
+ Promise.resolve(input)
+ );
+}
+
+// promise function 1
+function p1(a) {
+ return new Promise((resolve, reject) =&gt; {
+ resolve(a * 5);
+ });
+}
+
+// promise function 2
+function p2(a) {
+ return new Promise((resolve, reject) =&gt; {
+ resolve(a * 2);
+ });
+}
+
+// function 3 - sarà avvolta in una promise risolta da .then()
+function f3(a) {
+ return a * 3;
+}
+
+// promise function 4
+function p4(a) {
+ return new Promise((resolve, reject) =&gt; {
+ resolve(a * 4);
+ });
+}
+
+const promiseArr = [p1, p2, f3, p4];
+runPromiseInSequence(promiseArr, 10)
+ .then(console.log); // 1200
+</pre>
+
+<h3 id="Composizione_funzionale_per_tubazioni">Composizione funzionale per tubazioni</h3>
+
+<pre class="brush: js notranslate">// Elementi da utilizzare per la composizione
+const double = x =&gt; x + x;
+const triple = x =&gt; 3 * x;
+const quadruple = x =&gt; 4 * x;
+
+// Function composition enabling pipe functionality
+const pipe = (...functions) =&gt; input =&gt; functions.reduce(
+ (acc, fn) =&gt; fn(acc),
+ input
+);
+
+// Funzioni composte per la moltiplicazione di valori specifici
+const multiply6 = pipe(double, triple);
+const multiply9 = pipe(triple, triple);
+const multiply16 = pipe(quadruple, quadruple);
+const multiply24 = pipe(double, triple, quadruple);
+
+// Utilizzo
+multiply6(6); // 36
+multiply9(9); // 81
+multiply16(16); // 256
+multiply24(10); // 240
+
+</pre>
+
+<h3 id="Scrivere_map_usando_reduce">Scrivere map usando reduce</h3>
+
+<pre class="brush: js notranslate">if (!Array.prototype.mapUsingReduce) {
+ Array.prototype.mapUsingReduce = function(callback, thisArg) {
+ return this.reduce(function(mappedArray, currentValue, index, array) {
+ mappedArray[index] = callback.call(thisArg, currentValue, index, array);
+ return mappedArray;
+ }, []);
+ };
+}
+
+[1, 2, , 3].mapUsingReduce(
+ (currentValue, index, array) =&gt; currentValue + index + array.length
+); // [5, 7, , 10]
+
+</pre>
+
+<h2 id="Polyfill">Polyfill</h2>
+
+<pre class="brush: js notranslate">// Production steps of ECMA-262, Edition 5, 15.4.4.21
+// Reference: http://es5.github.io/#x15.4.4.21
+// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
+if (!Array.prototype.reduce) {
+ Object.defineProperty(Array.prototype, 'reduce', {
+ value: function(callback /*, initialValue*/) {
+ if (this === null) {
+ throw new TypeError( 'Array.prototype.reduce ' +
+ 'called on null or undefined' );
+ }
+ if (typeof callback !== 'function') {
+ throw new TypeError( callback +
+ ' is not a function');
+ }
+
+ // 1. Let O be ? ToObject(this value).
+ var o = Object(this);
+
+ // 2. Let len be ? ToLength(? Get(O, "length")).
+ var len = o.length &gt;&gt;&gt; 0;
+
+ // Steps 3, 4, 5, 6, 7
+ var k = 0;
+ var value;
+
+ if (arguments.length &gt;= 2) {
+ value = arguments[1];
+ } else {
+ while (k &lt; len &amp;&amp; !(k in o)) {
+ k++;
+ }
+
+ // 3. If len is 0 and initialValue is not present,
+ // throw a TypeError exception.
+ if (k &gt;= len) {
+ throw new TypeError( 'Reduce of empty array ' +
+ 'with no initial value' );
+ }
+ value = o[k++];
+ }
+
+ // 8. Repeat, while k &lt; len
+ while (k &lt; len) {
+ // a. Let Pk be ! ToString(k).
+ // b. Let kPresent be ? HasProperty(O, Pk).
+ // c. If kPresent is true, then
+ // i. Let kValue be ? Get(O, Pk).
+ // ii. Let accumulator be ? Call(
+ // callbackfn, undefined,
+ // « accumulator, kValue, k, O »).
+ if (k in o) {
+ value = callback(value, o[k], k, o);
+ }
+
+ // d. Increase k by 1.
+ k++;
+ }
+
+ // 9. Return accumulator.
+ return value;
+ }
+ });
+}
+</pre>
+
+<p>Se hai bisogno di supportare motori JavaScript veramente obsoleti che non supportano <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty">Object.defineProperty()</a></code>, è meglio non applicare polyfills ai metodi di <code>Array.prototype</code>, poiché non puoi renderli non enumerabili.</p>
+
+<h2 id="Specifiche">Specifiche</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specifica</th>
+ <th scope="col">Stato</th>
+ <th scope="col">Commento</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES5.1', '#sec-15.4.4.21', 'Array.prototype.reduce()')}}</td>
+ <td>{{Spec2('ES5.1')}}</td>
+ <td>Definizione iniziale Implementato in JavaScript 1.8.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-array.prototype.reduce', 'Array.prototype.reduce()')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.prototype.reduce', 'Array.prototype.reduce()')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilità_con_i_browser">Compatibilità con i browser</h2>
+
+<p>La tabella di compatibilità in questa pagina è generata a partire da dati strutturati. Se desideri contribuire ai dati, visita <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> e inviaci una pull request.</p>
+
+<div>
+<p>{{Compat("javascript.builtins.Array.reduce")}}</p>
+</div>
+
+<h2 id="Vedi_anche">Vedi anche</h2>
+
+<ul>
+ <li>{{jsxref("Array.prototype.reduceRight()")}}</li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/reverse/index.html b/files/it/web/javascript/reference/global_objects/array/reverse/index.html
new file mode 100644
index 0000000000..750befde61
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/reverse/index.html
@@ -0,0 +1,133 @@
+---
+title: Array.prototype.reverse()
+slug: Web/JavaScript/Reference/Global_Objects/Array/reverse
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/reverse
+---
+<div>{{JSRef}}</div>
+
+<p>Il metodo <code><strong>reverse()</strong></code>  inverte ua matrice (array) sul posto. Il primo elemento di matrice diventa l'ultima, e l'ultimo elemento di matrice diventa il primo.</p>
+
+<pre class="brush: js">var a = ['one', 'two', 'three'];
+a.reverse();
+
+console.log(a); // ['three', 'two', 'one']
+</pre>
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox"><var>a</var>.reverse()</pre>
+
+<h3 id="Valore_prodotto.">Valore prodotto. </h3>
+
+<p>La matrice invertita.</p>
+
+<h2 id="Descrizione">Descrizione</h2>
+
+<p>Il metodo reverse traspone gli elementi della matrice chiamata, <u>mutando la matrice</u>, e restituendo un riferimento alla matrice.</p>
+
+<h2 id="Esempi">Esempi</h2>
+
+<h3 id="Inversione_degli_elementi_nella_matrice">Inversione degli elementi nella matrice</h3>
+
+<p>L'esempio seguente crea una matrice a, contenente tre elementi, quindi inverte la matrice. La chiamata ad invertire () restituisce un riferimento alla matrice invertita a.</p>
+
+<pre class="brush: js">var a = ['one', 'two', 'three'];
+var reversed = a.reverse();
+
+console.log(a); // ['three', 'two', 'one']
+console.log(reversed); // ['three', 'two', 'one']
+</pre>
+
+<h2 id="Specifiche">Specifiche</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specifica</th>
+ <th scope="col">Status</th>
+ <th scope="col">Commento</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES1')}}</td>
+ <td>{{Spec2('ES1')}}</td>
+ <td>definizione iniziale. Implementata in JavaScript 1.1.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES5.1', '#sec-15.4.4.8', 'Array.prototype.reverse')}}</td>
+ <td>{{Spec2('ES5.1')}}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-array.prototype.reverse', 'Array.prototype.reverse')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.prototype.reverse', 'Array.prototype.reverse')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilità_browser">Compatibilità browser</h2>
+
+<div>{{CompatibilityTable}}</div>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Caratteristica</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Edge</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Supporto base</td>
+ <td>{{CompatChrome("1.0")}}</td>
+ <td>{{CompatGeckoDesktop("1.7")}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatIE("5.5")}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android</th>
+ <th>Chrome for Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Supporto base</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="Vedi_anche">Vedi anche</h2>
+
+<ul>
+ <li>{{jsxref("Array.prototype.join()")}}</li>
+ <li>{{jsxref("Array.prototype.sort()")}}</li>
+ <li>{{jsxref("TypedArray.prototype.reverse()")}}</li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/slice/index.html b/files/it/web/javascript/reference/global_objects/array/slice/index.html
new file mode 100644
index 0000000000..419da77ae4
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/slice/index.html
@@ -0,0 +1,241 @@
+---
+title: Array.prototype.slice()
+slug: Web/JavaScript/Reference/Global_Objects/Array/slice
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/slice
+---
+<div>{{JSRef}}</div>
+
+<p><code>Il metodo <strong>slice()</strong></code> ritorna la copia di una porzione dell'array contenente gli elementi compresi tra <code>inzio</code> e <code>fine</code> (<code>fine</code> escluso). Il metodo <strong>slice()</strong> ritorna la copia dell'intero array se non  contiene gli elementi di inizio e fine. L'array di partenza non viene modificato.</p>
+
+<pre class="brush: js">var a = ['zero', 'one', 'two', 'three'];
+var sliced = a.slice(1, 3);
+
+console.log(a); // ['zero', 'one', 'two', 'three']
+console.log(sliced); // ['one', 'two']
+</pre>
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox"><var>arr</var>.slice()
+<var>arr</var>.slice(<var>inizio</var>)
+<var>arr</var>.slice(<var>inizio</var>, <var>fine</var>)
+</pre>
+
+<h3 id="Parametri">Parametri</h3>
+
+<dl>
+ <dt><code>begin</code> {{optional_inline}}</dt>
+ <dd>L'indice zero-based indica da dove inizia l'intervallo da selezionare.</dd>
+ <dd>Può essere utilizzato un indice negativo, indicante l'offset dall'ultimo elemento dell'array. <code>slice(-2)</code> seleziona gli ultimi due elementi della sequenza.</dd>
+ <dd>Se <code>begin</code> non viene impostato , <code>slice</code> parte dall'indice <code>0</code>.</dd>
+ <dt><code>end</code> {{optional_inline}}</dt>
+ <dd>L' indice zero-base indica dove finisce l'intervallo da selezionare. <code>slice </code>seleziona gli elementi fino a quell'indice ma non l'elemento all'indice <code>end</code>.</dd>
+ <dd>Per esempio, <code>slice(1,4)</code>estrae dal secondo elemento dell'array al quarto escluso (elementi con indice 1, 2 e 3).</dd>
+ <dd>Puo essere utilizzato un indice negativo, tale indice indicherebbe l'offset dall'ultimo elemento dell'array. <code>slice(2,-1)</code> estrae dal terzo elemento della sequenza al penuntimo.</dd>
+ <dd>Se <code>end</code> non viene impostato, <code>slice</code> continua l'estrazione sino al termine dell'array (<code>arr.length</code>).</dd>
+ <dd>Se <code>end</code> è maggiore della lunghezza della sequenza , <code>slice</code> continua l'estrazione sino al termine dell'array (<code>arr.length</code>).</dd>
+</dl>
+
+<h3 id="Return_value">Return value</h3>
+
+<p>Un nuovo array che contiene gli elementi estratti.</p>
+
+<h2 id="Descrizione">Descrizione</h2>
+
+<p><code>slice</code> non modifica l'array originale. Restituisce una copia superficiale degli elementi dell'array originale. Gli elementi dell'array originale vengono copiati nell'array restituito come segue:</p>
+
+<ul>
+ <li>Per i riferimenti a oggetti (e non i veri e propri oggetti), <code>slice</code> copia i riferimenti nel nuovo array. Entrambi gli array riferiscono quindi lo stesso oggetto. Se un oggetto riferito viene modificato, le modifiche interessano entrambi gli array.</li>
+ <li>Per le stringhe, i numeri e i boolean (non oggetti {{jsxref("String")}}, {{jsxref("Number")}} e {{jsxref("Boolean")}} <code>slice</code> copia i valori nel nuovo array. Le modifiche alle stringhe, ai numeri e ai boolean in un array non interessano l'altro array.</li>
+</ul>
+
+<p>Se viene aggiunto un nuovo elemento in uno degli array, l'altro non viene modificato.</p>
+
+<h2 id="Esempi">Esempi</h2>
+
+<h3 id="Restituire_una_porzione_dellarray_esistente">Restituire una porzione dell'array esistente</h3>
+
+<pre class="brush: js">var fruits = ['Banana', 'Orange', 'Lemon', 'Apple', 'Mango'];
+var citrus = fruits.slice(1, 3);
+
+// fruits contains ['Banana', 'Orange', 'Lemon', 'Apple', 'Mango']
+// citrus contains ['Orange','Lemon']
+</pre>
+
+<h3 id="Utilizzare_slice">Utilizzare <code>slice</code></h3>
+
+<p>Nell'esempio che segue, <code>slice</code> crea un nuovo array, <code>newCar</code>, da <code>myCar</code>. Entrambi includono un riferimento all'oggetto <code>myHonda</code>. Quando il colore di <code>myHonda</code> diventa viola, entrambi gli array riflettono la modifica.</p>
+
+<pre class="brush: js">// Creare newCar da myCar utilizzando slice.
+var myHonda = { color: 'red', wheels: 4, engine: { cylinders: 4, size: 2.2 } };
+var myCar = [myHonda, 2, 'cherry condition', 'purchased 1997'];
+var newCar = myCar.slice(0, 2);
+
+// Mostrare i valori di myCar, newCar, e il colore di myHonda
+// riferiti da entrambi gli array.
+console.log('myCar = ' + JSON.stringify(myCar));
+console.log('newCar = ' + JSON.stringify(newCar));
+console.log('myCar[0].color = ' + myCar[0].color);
+console.log('newCar[0].color = ' + newCar[0].color);
+
+// Modificare il colore di myHonda.
+myHonda.color = 'purple';
+console.log('The new color of my Honda is ' + myHonda.color);
+
+// Mostrare il colore di myHonda riferito da entrambi gli array.
+console.log('myCar[0].color = ' + myCar[0].color);
+console.log('newCar[0].color = ' + newCar[0].color);
+</pre>
+
+<p>Lo script scrive:</p>
+
+<pre class="brush: js">myCar = [{color: 'red', wheels: 4, engine: {cylinders: 4, size: 2.2}}, 2,
+ 'cherry condition', 'purchased 1997']
+newCar = [{color: 'red', wheels: 4, engine: {cylinders: 4, size: 2.2}}, 2]
+myCar[0].color = red
+newCar[0].color = red
+The new color of my Honda is purple
+myCar[0].color = purple
+newCar[0].color = purple
+</pre>
+
+<h2 id="Oggetti_Array-like">Oggetti Array-like</h2>
+
+<p>Il metodo <code>slice</code> può essere chiamato anche per convertire gli oggetti o le collezioni Array-like in un nuovo Array. Basta legare il metodo all'oggetto. {{jsxref("Functions/arguments", "arguments")}} all'interno di una funzione è un esempio di 'array-like object'.</p>
+
+<pre class="brush: js">function list() {
+ return Array.prototype.slice.call(arguments);
+}
+
+var list1 = list(1, 2, 3); // [1, 2, 3]
+</pre>
+
+<p>Il binding può essere effettuato con la funzione .<code>call</code> di {{jsxref("Function.prototype")}}<span style="font-size: 1rem; letter-spacing: -0.00278rem;"> e può anche essere ridotto utilizzando </span><code style="font-size: 1rem; letter-spacing: -0.00278rem;">[].slice.call(arguments)</code><span style="font-size: 1rem; letter-spacing: -0.00278rem;"> invece di </span><code style="font-size: 1rem; letter-spacing: -0.00278rem;">Array.prototype.slice.call</code><span style="font-size: 1rem; letter-spacing: -0.00278rem;">. Ad ogni modo, può essere semplificato utilizzando {{jsxref("Function.prototype.bind", "bind")}}.</span></p>
+
+<pre class="brush: js">var unboundSlice = Array.prototype.slice;
+var slice = Function.prototype.call.bind(unboundSlice);
+
+function list() {
+ return slice(arguments);
+}
+
+var list1 = list(1, 2, 3); // [1, 2, 3]
+</pre>
+
+<h2 id="Streamlining_cross-browser_behavior">Streamlining cross-browser behavior</h2>
+
+<p>Although host objects (such as DOM objects) are not required by spec to follow the Mozilla behavior when converted by <code>Array.prototype.slice</code> and IE &lt; 9 does not do so, versions of IE starting with version 9 do allow this. “Shimming” it can allow reliable cross-browser behavior. As long as other modern browsers continue to support this ability, as currently do IE, Mozilla, Chrome, Safari, and Opera, developers reading (DOM-supporting) slice code relying on this shim will not be misled by the semantics; they can safely rely on the semantics to provide the now apparently <em>de facto</em> standard behavior. (The shim also fixes IE to work with the second argument of <code>slice()</code> being an explicit {{jsxref("null")}}/{{jsxref("undefined")}} value as earlier versions of IE also did not allow but all modern browsers, including IE &gt;= 9, now do.)</p>
+
+<pre class="brush: js">/**
+ * Shim for "fixing" IE's lack of support (IE &lt; 9) for applying slice
+ * on host objects like NamedNodeMap, NodeList, and HTMLCollection
+ * (technically, since host objects have been implementation-dependent,
+ * at least before ES2015, IE hasn't needed to work this way).
+ * Also works on strings, fixes IE &lt; 9 to allow an explicit undefined
+ * for the 2nd argument (as in Firefox), and prevents errors when
+ * called on other DOM objects.
+ */
+(function () {
+ 'use strict';
+ var _slice = Array.prototype.slice;
+
+ try {
+ // Can't be used with DOM elements in IE &lt; 9
+ _slice.call(document.documentElement);
+ } catch (e) { // Fails in IE &lt; 9
+ // This will work for genuine arrays, array-like objects,
+ // NamedNodeMap (attributes, entities, notations),
+ // NodeList (e.g., getElementsByTagName), HTMLCollection (e.g., childNodes),
+ // and will not fail on other DOM objects (as do DOM elements in IE &lt; 9)
+ Array.prototype.slice = function(begin, end) {
+ // IE &lt; 9 gets unhappy with an undefined end argument
+ end = (typeof end !== 'undefined') ? end : this.length;
+
+ // For native Array objects, we use the native slice function
+ if (Object.prototype.toString.call(this) === '[object Array]'){
+ return _slice.call(this, begin, end);
+ }
+
+ // For array like object we handle it ourselves.
+ var i, cloned = [],
+ size, len = this.length;
+
+ // Handle negative value for "begin"
+ var start = begin || 0;
+ start = (start &gt;= 0) ? start : Math.max(0, len + start);
+
+ // Handle negative value for "end"
+ var upTo = (typeof end == 'number') ? Math.min(end, len) : len;
+ if (end &lt; 0) {
+ upTo = len + end;
+ }
+
+ // Actual expected size of the slice
+ size = upTo - start;
+
+ if (size &gt; 0) {
+ cloned = new Array(size);
+ if (this.charAt) {
+ for (i = 0; i &lt; size; i++) {
+ cloned[i] = this.charAt(start + i);
+ }
+ } else {
+ for (i = 0; i &lt; size; i++) {
+ cloned[i] = this[start + i];
+ }
+ }
+ }
+
+ return cloned;
+ };
+ }
+}());
+</pre>
+
+<h2 id="Specifications">Specifications</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES3')}}</td>
+ <td>{{Spec2('ES3')}}</td>
+ <td>Initial definition. Implemented in JavaScript 1.2.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES5.1', '#sec-15.4.4.10', 'Array.prototype.slice')}}</td>
+ <td>{{Spec2('ES5.1')}}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-array.prototype.slice', 'Array.prototype.slice')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.prototype.slice', 'Array.prototype.slice')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+<div>
+
+
+<p>{{Compat("javascript.builtins.Array.slice")}}</p>
+</div>
+
+<h2 id="See_also">See also</h2>
+
+<ul>
+ <li>{{jsxref("Array.prototype.splice()")}}</li>
+ <li>{{jsxref("Function.prototype.call()")}}</li>
+ <li>{{jsxref("Function.prototype.bind()")}}</li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/some/index.html b/files/it/web/javascript/reference/global_objects/array/some/index.html
new file mode 100644
index 0000000000..3befa8a8b0
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/some/index.html
@@ -0,0 +1,202 @@
+---
+title: Array.prototype.some()
+slug: Web/JavaScript/Reference/Global_Objects/Array/some
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/some
+---
+<div>{{JSRef}}</div>
+
+<p>Il metodo <code><strong>some()</strong></code> verifica se almeno un elemento nell'array passa la verifica implementata dalla funzione fornita.</p>
+
+<div class="note">
+<p><strong>Note</strong>: Questo metodo ritorna <code>false</code> per qualsiasi condizione passata ad un array vuoto.</p>
+</div>
+
+
+
+<div>{{EmbedInteractiveExample("pages/js/array-some.html")}}</div>
+
+
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox"><var>arr</var>.some(<var>callback</var>[, <var>thisArg</var>])</pre>
+
+<h3 id="Parametri">Parametri</h3>
+
+<dl>
+ <dt><code>callback</code></dt>
+ <dd>Funzione di test per ogni elemento, prende tre elementi:
+ <dl>
+ <dt><code>valoreCorrente</code></dt>
+ <dd>Il valore corrente dell'elemento che deve essere processato nell'array.</dd>
+ <dt><code>indice</code> {{Optional_inline}}</dt>
+ <dd>l'indice dell'elemento corrente dell'array.</dd>
+ <dt><code>array</code>{{Optional_inline}}</dt>
+ <dd>l'array completo alla quale è stato chiamato il <code>some().</code></dd>
+ </dl>
+ </dd>
+ <dt><code>thisArg</code>{{Optional_inline}}</dt>
+ <dd>Valore da usare come <code>this</code> quando si esegue la <code>callback</code>.</dd>
+</dl>
+
+<h3 id="Valore_ritornato">Valore ritornato</h3>
+
+<p><code><strong>true</strong></code> se la funzione di callback ha ritornato un valore {{Glossary("truthy")}} per almeno un elemento nell'array; altrimenti, <code><strong>false</strong></code>.</p>
+
+<h2 id="Descrizione">Descrizione</h2>
+
+<p><code>some()</code> esegue la funzione di <code>callback</code> per ogni elemento presente nell'array finchè non ne trova uno dove la <code>callback</code> retorna un valore <em>truthy</em> (un valore che ritorna <code>true</code> se convertito in un Booleano). Se viene trovato un elemento di questo genere allora <code>some()</code> ritorna immediatamente <code>true</code>. altrimenti, <code>some()</code> ritorna <code>false</code>. <code>callback</code> viene invocato solamente solamente per gli elementi che hanno un valore assegnato; quindi non viene chiamato per elementi eliminati o mai assegnati.</p>
+
+<p><code>callback</code> è invocato con tre argomenti: il valore dell'elemento, l'indice dell'elemento nell'array, e l'array dalla quale è stato invocato.</p>
+
+<p>se viene passato un parametro <code>thisArg</code> al metodo <code>some()</code>, verrà usato come valore <code>this</code> per le callbacks. altrimenti, verrà usato il valore {{jsxref("undefined")}} come valore di <code>this</code>. Il valore di <code>this</code> nella <code>callback</code> è determinato in accordo con <a href="https://developer.mozilla.org/it/docs/Web/JavaScript/Reference/Operators/this">le normali regole per determinare il valore di this nelle funzioni</a>.</p>
+
+<p><code>some()</code> non muta l'array dalla quale è stato evocato.</p>
+
+<p>Il range di elementi processati da <code>some()</code> è impostato prima della prima chiamata alla <code>callback</code>. Gli elementi che vengono attaccati o aggiunti all'array dopo che è stata effettuata la chiamata al metodo <code>some()</code> non verranno tenuti in considerazione. Se al contrario un elemento viene cambiato prima che venga processato dalla <code>callback</code>, il valore passato sarà quello modificato.  Elementi eliminati invece non verranno controllati. </p>
+
+<h2 id="Esempi">Esempi</h2>
+
+<h3 id="Testare_i_valori_all'interno_di_un_array">Testare i valori all'interno di un array</h3>
+
+<p>L'esempio seguente testa se almeno un elemento dell'array è maggiore di 10.</p>
+
+<pre class="brush: js">function isBiggerThan10(element, index, array) {
+ return element &gt; 10;
+}
+
+[2, 5, 8, 1, 4].some(isBiggerThan10); // false
+[12, 5, 8, 1, 4].some(isBiggerThan10); // true
+</pre>
+
+<h3 id="Testing_array_elements_using_arrow_functions">Testing array elements using arrow functions</h3>
+
+<p><a href="/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions">Arrow functions</a> provide a shorter syntax for the same test.</p>
+
+<pre class="brush: js">[2, 5, 8, 1, 4].some(x =&gt; x &gt; 10); // false
+[12, 5, 8, 1, 4].some(x =&gt; x &gt; 10); // true
+</pre>
+
+<h3 id="Checking_whether_a_value_exists_in_an_array">Checking whether a value exists in an array</h3>
+
+<p>To mimic the function of the <code>includes()</code> method, this custom function returns <code>true</code> if the element exists in the array:</p>
+
+<pre class="brush: js">var fruits = ['apple', 'banana', 'mango', 'guava'];
+
+function checkAvailability(arr, val) {
+ return arr.some(function(arrVal) {
+ return val === arrVal;
+ });
+}
+
+checkAvailability(fruits, 'kela'); // false
+checkAvailability(fruits, 'banana'); // true</pre>
+
+<h3 id="Checking_whether_a_value_exists_using_an_arrow_function">Checking whether a value exists using an arrow function</h3>
+
+<pre class="brush: js">var fruits = ['apple', 'banana', 'mango', 'guava'];
+
+function checkAvailability(arr, val) {
+ return arr.some(arrVal =&gt; val === arrVal);
+}
+
+checkAvailability(fruits, 'kela'); // false
+checkAvailability(fruits, 'banana'); // true</pre>
+
+<h3 id="Converting_any_value_to_Boolean">Converting any value to Boolean</h3>
+
+<pre class="brush: js">var TRUTHY_VALUES = [true, 'true', 1];
+
+function getBoolean(value) {
+ 'use strict';
+
+ if (typeof value === 'string') {
+ value = value.toLowerCase().trim();
+ }
+
+ return TRUTHY_VALUES.some(function(t) {
+ return t === value;
+ });
+}
+
+getBoolean(false); // false
+getBoolean('false'); // false
+getBoolean(1); // true
+getBoolean('true'); // true</pre>
+
+<h2 id="Polyfill">Polyfill</h2>
+
+<p><code>some()</code> was added to the ECMA-262 standard in the 5th edition; as such it may not be present in all implementations of the standard. You can work around this by inserting the following code at the beginning of your scripts, allowing use of <code>some()</code> in implementations which do not natively support it. This algorithm is exactly the one specified in ECMA-262, 5th edition, assuming {{jsxref("Object")}} and {{jsxref("TypeError")}} have their original values and that <code>fun.call</code> evaluates to the original value of {{jsxref("Function.prototype.call()")}}.</p>
+
+<pre class="brush: js">// Production steps of ECMA-262, Edition 5, 15.4.4.17
+// Reference: http://es5.github.io/#x15.4.4.17
+if (!Array.prototype.some) {
+ Array.prototype.some = function(fun/*, thisArg*/) {
+ 'use strict';
+
+ if (this == null) {
+ throw new TypeError('Array.prototype.some called on null or undefined');
+ }
+
+ if (typeof fun !== 'function') {
+ throw new TypeError();
+ }
+
+ var t = Object(this);
+ var len = t.length &gt;&gt;&gt; 0;
+
+ var thisArg = arguments.length &gt;= 2 ? arguments[1] : void 0;
+ for (var i = 0; i &lt; len; i++) {
+ if (i in t &amp;&amp; fun.call(thisArg, t[i], i, t)) {
+ return true;
+ }
+ }
+
+ return false;
+ };
+}
+</pre>
+
+<h2 id="Specifications">Specifications</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES5.1', '#sec-15.4.4.17', 'Array.prototype.some')}}</td>
+ <td>{{Spec2('ES5.1')}}</td>
+ <td>Initial definition. Implemented in JavaScript 1.6.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-array.prototype.some', 'Array.prototype.some')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.prototype.some', 'Array.prototype.some')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+<div>
+
+
+<p>{{Compat("javascript.builtins.Array.some")}}</p>
+</div>
+
+<h2 id="See_also">See also</h2>
+
+<ul>
+ <li>{{jsxref("Array.prototype.find()")}}</li>
+ <li>{{jsxref("Array.prototype.forEach()")}}</li>
+ <li>{{jsxref("Array.prototype.every()")}}</li>
+ <li>{{jsxref("TypedArray.prototype.some()")}}</li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/sort/index.html b/files/it/web/javascript/reference/global_objects/array/sort/index.html
new file mode 100644
index 0000000000..6c16c7dd6b
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/sort/index.html
@@ -0,0 +1,267 @@
+---
+title: Array.prototype.sort()
+slug: Web/JavaScript/Reference/Global_Objects/Array/sort
+tags:
+ - Array
+ - JavaScript
+ - Metodi
+ - Prototype
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/sort
+---
+<div>{{JSRef}}</div>
+
+<p>Il metodo <code><strong>sort()</strong></code> ordina gli elementi di un array <em><a href="https://en.wikipedia.org/wiki/In-place_algorithm">in place</a></em> e ritorna l'array. L'ordinamento non è necessariamente <a href="https://en.wikipedia.org/wiki/Sorting_algorithm#Stability">stable</a>. L'ordinamento predefinito è in base ai punti di codice Unicode della stringa.</p>
+
+<p>Il tempo e la complessità dell'ordinamento dipendono dall'implementazione, perciò non possono essere garantiti.</p>
+
+<pre class="brush: js">var fruit = ['cherries', 'apples', 'bananas'];
+fruit.sort(); // ['apples', 'bananas', 'cherries']
+
+var scores = [1, 10, 21, 2];
+scores.sort(); // [1, 10, 2, 21]
+// Nota che 10 viene prima di 2,
+// perché '10' è l'insieme di due caratteri '1' e '0' così '10' viene prima di '2' nell'ordine dei codici Unicode code .
+
+var things = ['word', 'Word', '1 Word', '2 Words'];
+things.sort(); // ['1 Word', '2 Words', 'Word', 'word']
+// In Unicode, i numeri vengono prima delle lettere maiuscole,
+// che vengono prima delle lettere minuscole.
+</pre>
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox"><var>arr</var>.sort()
+<var>arr</var>.sort(<var>[compareFunction]</var>)
+</pre>
+
+<h3 id="Parametri">Parametri</h3>
+
+<dl>
+ <dt><code>compareFunction</code> {{optional_inline}}</dt>
+ <dd>Specifica una funzione che definisce il tipo di ordinamento. Se viene omessa, l'array è ordinato in base ai valori dei suoi caratteri <a href="/en-US/docs/Web/JavaScript/Guide/Values,_variables,_and_literals#Unicode">Unicode</a> code , basandosi sulle stringhe di ogni elemento convertito.</dd>
+</dl>
+
+<h3 id="Valore_ritornato">Valore ritornato</h3>
+
+<p>L'array ordinato. Nota che l'array è ordinato <em><a href="https://en.wikipedia.org/wiki/In-place_algorithm">in place</a></em>, e non viene fatta alcuna copia.</p>
+
+<h2 id="Descrizione">Descrizione</h2>
+
+<p>Se non viene fornita una <code>compareFunction</code> , gli elementi vengono ordinati convertendoli in stringhe e confrontando le stringhe nell'ordine dei codici Unicode . Per esempio, "Banana" viene prima di "cherry". In ordine numerico, 9 arriva prima dell'80, ma poiché i numeri vengono convertiti in stringhe, "80" viene prima di "9" nell'ordine Unicode.</p>
+
+<p>Se viene fornita una <code>compareFunction</code> , gli elementi dell'array vengono ordinati in base al valore restituito della funzione di confronto. Se a e b sono due elementi da confrontare, allora:</p>
+
+<ul>
+ <li>Se <code>compareFunction(a, b)</code> è minore di 0, posiziona <code>a</code> in un indice inferiore di <code>b</code>, quindi <code>a</code> viene prima.</li>
+ <li>Se <code>compareFunction(a, b)</code> ritorna 0, lascia <code>a</code> e <code>b</code> invariati l'uno rispetto all'altro, ma ordinati rispetto a tutti i diversi elementi. Nota: lo standard ECMAscript non garantisce questo comportamento, quindi non tutti i browser (ad esempio versioni di Mozilla risalenti almeno al 2003) rispettano questo.</li>
+ <li>Se <code>compareFunction(a, b)</code> è maggiore di 0, posiziona <code>b</code> con un indice più basso di <code>a</code>, cioè <code>b</code> viene prima.</li>
+ <li><code>compareFunction(a, b)</code> deve sempre restituire lo stesso valore quando viene data una coppia specifica di elementi a e b come i suoi due argomenti. Se vengono restituiti risultati non coerenti, l'ordinamento non è definito.</li>
+</ul>
+
+<p>Quindi, la funzione di confronto ha la seguente forma:</p>
+
+<pre class="brush: js">function compare(a, b) {
+ if (a è inferiore a b secondo un criterio di ordinamento) {
+ return -1;
+ }
+ if (a è maggiore di b secondo un criterio di ordinamento) {
+ return 1;
+ }
+ // a deve essere uguale a b
+ return 0;
+}
+</pre>
+
+<p>Per confrontare i numeri anziché le stringhe, la funzione di confronto può semplicemente sottrarre <code>b</code> da <code>a</code>. La seguente funzione ordinerà l'array in ordine crescente (se non contiene <code>Infinity</code> e <code>NaN</code>):</p>
+
+<pre class="brush: js">function compareNumbers(a, b) {
+ return a - b;
+}
+</pre>
+
+<p>Il metodo <code>sort</code> può essere usato bene con {{jsxref("Operators/function", "function expressions", "", 1)}} ( e <a href="/en-US/docs/Web/JavaScript/Guide/Closures">closures</a>):</p>
+
+<pre class="brush: js">var numbers = [4, 2, 5, 1, 3];
+numbers.sort(function(a, b) {
+ return a - b;
+});
+console.log(numbers);
+
+// [1, 2, 3, 4, 5]
+</pre>
+
+<p>ES2015 fornisce le {{jsxref("Functions_and_function_scope/Arrow_functions", "arrow function", "", 1)}}, che consentono una sintassi più compatta:</p>
+
+<pre class="brush: js">let numbers = [4, 2, 5, 1, 3];
+numbers.sort((a, b) =&gt; a - b);
+console.log(numbers);
+
+// [1, 2, 3, 4, 5]</pre>
+
+<p>Gli Object possono essere ordinati passando il valore di una delle loro proprietà.</p>
+
+<pre class="brush: js">var items = [
+ { name: 'Edward', value: 21 },
+ { name: 'Sharpe', value: 37 },
+ { name: 'And', value: 45 },
+ { name: 'The', value: -12 },
+ { name: 'Magnetic', value: 13 },
+ { name: 'Zeros', value: 37 }
+];
+
+// ordinamento per valore
+items.sort(function (a, b) {
+ return a.value - b.value;
+});
+
+// ordinamento per nome
+items.sort(function(a, b) {
+ var nameA = a.name.toUpperCase(); // ignora maiuscole e minuscole
+ var nameB = b.name.toUpperCase(); // ignora maiuscole e minuscole
+  if (nameA &lt; nameB) {
+ return -1;
+  }
+  if (nameA &gt; nameB) {
+ return 1;
+  }
+
+  // i nomi devono essere uguali
+  return 0;
+});</pre>
+
+<h2 id="Esempi">Esempi</h2>
+
+<h3 id="Creare_visualizzare_ed_ordinare_un_array">Creare, visualizzare, ed ordinare un array</h3>
+
+<p>L'esempio seguente crea quattro array , visualizza l'array originale e successivamente l'array ordinato. Gli array numerici sono ordinati prima senza e poi con una funzione di comparazione .</p>
+
+<pre class="brush: js">var stringArray = ['Blue', 'Humpback', 'Beluga'];
+var numericStringArray = ['80', '9', '700'];
+var numberArray = [40, 1, 5, 200];
+var mixedNumericArray = ['80', '9', '700', 40, 1, 5, 200];
+
+function compareNumbers(a, b) {
+ return a - b;
+}
+
+console.log('stringArray:', stringArray.join());
+console.log('Ordinato:', stringArray.sort());
+
+console.log('numberArray:', numberArray.join());
+console.log('Ordinato senza funzione compare:', numberArray.sort());
+console.log('Ordinato con compareNumbers:', numberArray.sort(compareNumbers));
+
+console.log('numericStringArray:', numericStringArray.join());
+console.log('Ordinato senza funzione compare:', numericStringArray.sort());
+console.log('Ordinato con compareNumbers:', numericStringArray.sort(compareNumbers));
+
+console.log('mixedNumericArray:', mixedNumericArray.join());
+console.log('Ordinato senza funzione compare:', mixedNumericArray.sort());
+console.log('Ordinato con compareNumbers:', mixedNumericArray.sort(compareNumbers));
+</pre>
+
+<p>Questo esempio produce il seguente output. Come viene mostrato, quando viene usata una funzione comparativa, i numeri vengono ordinati correttamente sia nel caso siano numeri che nel caso siano stringhe di numeri.</p>
+
+<pre>stringArray: Blue,Humpback,Beluga
+Ordinato: Beluga,Blue,Humpback
+
+numberArray: 40,1,5,200
+Ordinato senza funzione compare: 1,200,40,5
+Ordinato con compareNumbers: 1,5,40,200
+
+numericStringArray: 80,9,700
+Ordinato senza funzione compare: 700,80,9
+Ordinato con compareNumbers: 9,80,700
+
+mixedNumericArray: 80,9,700,40,1,5,200
+Ordinato senza funzione compare: 1,200,40,5,700,80,9
+Ordinato con compareNumbers: 1,5,9,40,80,200,700
+</pre>
+
+<h3 id="Ordinare_caratteri_non-ASCII">Ordinare caratteri non-ASCII </h3>
+
+<p>Per ordinare stringhe con caratteri non-ASCII, cioè stringhe con caratteri accentati (e, é, è, a, ä, etc.), stringhe da lingue diverse dall'inglese: si usa {{jsxref("String.localeCompare")}}. Questa funzione può confrontare quei caratteri in modo che compaiano nel giusto ordine.</p>
+
+<pre class="brush: js">var items = ['réservé', 'premier', 'cliché', 'communiqué', 'café', 'adieu'];
+items.sort(function (a, b) {
+ return a.localeCompare(b);
+});
+
+// items is ['adieu', 'café', 'cliché', 'communiqué', 'premier', 'réservé']
+</pre>
+
+<h3 id="Ordinare_con_map">Ordinare con map</h3>
+
+<p>La <code>compareFunction</code> può essere invocata più volte per elemento all'interno dell'array. In base alla natura della <code>compareFunction</code>, si potrebbe produrre un sovraccarico elevato. Maggiore è il lavoro svolto da <code>compareFunction</code> e maggiori sono gli elementi da ordinare, potrebbe essere saggio utilizzare una <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map">map</a> per l'ordinamento. L'idea è di percorrere una volta l'array per estrarre i valori effettivi usati per l'ordinamento in un array temporaneo, ordinare l'array temporaneo e quindi percorrere l'array temporaneo per ottenere l'ordine giusto.</p>
+
+<pre class="brush: js" dir="rtl">// l'array da ordinare
+var list = ['Delta', 'alpha', 'CHARLIE', 'bravo'];
+
+// l'array temporaneo contiene oggetti con posizione e valore di ordinamento
+var mapped = list.map(function(el, i) {
+ return { index: i, value: el.toLowerCase() };
+})
+
+// ordinamento dell'array mappato contenente i valori ridotti
+mapped.sort(function(a, b) {
+ if (a.value &gt; b.value) {
+ return 1;
+ }
+ if (a.value &lt; b.value) {
+ return -1;
+ }
+ return 0;
+});
+
+// contenitore per l'ordine risultante
+var result = mapped.map(function(el){
+ return list[el.index];
+});
+</pre>
+
+<h2 id="Specifiche">Specifiche</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specifica</th>
+ <th scope="col">Stato</th>
+ <th scope="col">Osservazione</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES1')}}</td>
+ <td>{{Spec2('ES1')}}</td>
+ <td>Definizione iniziale.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES5.1', '#sec-15.4.4.11', 'Array.prototype.sort')}}</td>
+ <td>{{Spec2('ES5.1')}}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-array.prototype.sort', 'Array.prototype.sort')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.prototype.sort', 'Array.prototype.sort')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilità_con_il_browser">Compatibilità con il browser</h2>
+
+<div>
+<div class="hidden">La tabella di compatibilità in questa pagina è generata da dati strutturati. Se desideri contribuire ai dati, consulta <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> e inviaci una richiesta di pull.</div>
+
+<p>{{Compat("javascript.builtins.Array.sort")}}</p>
+</div>
+
+<h2 id="Vedi_anche">Vedi anche</h2>
+
+<ul>
+ <li>{{jsxref("Array.prototype.reverse()")}}</li>
+ <li>{{jsxref("String.prototype.localeCompare()")}}</li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/splice/index.html b/files/it/web/javascript/reference/global_objects/array/splice/index.html
new file mode 100644
index 0000000000..a68058baf8
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/splice/index.html
@@ -0,0 +1,163 @@
+---
+title: Array.prototype.splice()
+slug: Web/JavaScript/Reference/Global_Objects/Array/splice
+tags:
+ - Aggiunta
+ - Array
+ - JavaScript
+ - Method
+ - Prototype
+ - Reference
+ - Rimozione
+ - splice
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/splice
+---
+<div>{{JSRef}}</div>
+
+<p>Il metodo <strong><code>splice()</code></strong> modifica il contenuto di un array rimuovendo o sostituendo elementi esistenti e/o aggiungendo nuovi elementi <a href="https://en.wikipedia.org/wiki/In-place_algorithm">in place</a>.</p>
+
+<div>{{EmbedInteractiveExample("pages/js/array-splice.html")}}</div>
+
+
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox"><var>var arrDeletedItems = array</var>.splice(<var>start[</var>, <var>deleteCount[</var>, <var>item1[</var>, <var>item2[</var>, <em>...]]]]</em>)
+</pre>
+
+<h3 id="Parametri">Parametri</h3>
+
+<dl>
+ <dt><code>start</code></dt>
+ <dd>L'indice al quale iniziare a cambiare l'array. Se maggiore della lunghezza dell'array, <code>start</code> sarà impostato sulla lunghezza dell'array. Se negativo, inizierà molti elementi dalla fine dell'array (con origine -1, che significa -n è l'indice dell'ultimo elemento dell'ennesima ed è quindi equivalente all'indice di <code>array.length - n</code>). Se il valore assoluto di  <code>start</code> è maggiore della lunghezza dell'array, inizierà dall'indice 0.</dd>
+ <dt><code>deleteCount</code> {{optional_inline}}</dt>
+ <dd>Un numero intero che indica il numero di elementi nell'array da rimuovere da <code>start</code>.</dd>
+ <dd>Se <code>deleteCount</code> viene omesso, o se il suo valore è uguale o maggiore di <code>array.length - start</code> (cioè, se è uguale o maggiore del numero di elementi rimasti nell'array, a partire da <code>start</code>), tutti gli elementi da <code>start</code> alla fine dell'array verranno eliminati.</dd>
+ <dd>Se <code>deleteCount</code> è 0 o negativo, non vengono rimossi elementi. In questo caso, devi specificare almeno un nuovo elemento (vedi sotto).</dd>
+ <dt><code>item1, item2, <em>...</em></code> {{optional_inline}}</dt>
+ <dd>Gli elementi da aggiungere all'array, a partire da <code>start</code>. Se non viene specificato alcun elemento, <code>splice()</code> rimuoverà solo gli elementi dall'array.</dd>
+</dl>
+
+<h3 id="Valore_di_ritorno">Valore di ritorno</h3>
+
+<p>Un array contenente gli elementi eliminati. Se viene rimosso solo un elemento, viene restituito un array di un elemento. Se non vengono rimossi elementi, viene restituito un array vuoto.</p>
+
+<h2 id="Descrizione">Descrizione</h2>
+
+<p>Se il numero specificato di elementi da inserire differisce dal numero di elementi da rimuovere, la lunghezza dell'array sarà diversa alla fine della chiamata.</p>
+
+<h2 id="Esempi">Esempi</h2>
+
+<h3 id="Rimuovi_0_(zero)_elementi_dall'indice_2_e_inserisci_drum">Rimuovi 0 (zero) elementi dall'indice 2 e inserisci "drum"</h3>
+
+<pre class="brush: js">var myFish = ['angel', 'clown', 'mandarin', 'sturgeon'];
+var removed = myFish.splice(2, 0, 'drum');
+
+// myFish è ["angel", "clown", "drum", "mandarin", "sturgeon"]
+// removed è [], nessun elemento rimosso</pre>
+
+<h3 id="Rimuovi_0_(zero)_elementi_dall'indice_2_e_inserisci_drum_e_guitar">Rimuovi 0 (zero) elementi dall'indice 2 e inserisci "drum" e "guitar"</h3>
+
+<pre class="brush: js">var myFish = ['angel', 'clown', 'mandarin', 'sturgeon'];
+var removed = myFish.splice(2, 0, 'drum', 'guitar');
+
+// myFish è ["angel", "clown", "drum", "guitar", "mandarin", "sturgeon"]
+// removed è [], nessun elemento rimosso
+</pre>
+
+<h3 id="Rimuovi_1_elemento_dall'indice_3">Rimuovi 1 elemento dall'indice 3</h3>
+
+<pre class="brush: js">var myFish = ['angel', 'clown', 'drum', 'mandarin', 'sturgeon'];
+var removed = myFish.splice(3, 1);
+
+// removed è ["mandarin"]
+// myFish è ["angel", "clown", "drum", "sturgeon"]
+</pre>
+
+<h3 id="Rimuovi_1_elemento_dall'indice_2_e_inserisci_trumpet">Rimuovi 1 elemento dall'indice 2 e inserisci "trumpet"</h3>
+
+<pre class="brush: js">var myFish = ['angel', 'clown', 'drum', 'sturgeon'];
+var removed = myFish.splice(2, 1, 'trumpet');
+
+// myFish è ["angel", "clown", "trumpet", "sturgeon"]
+// removed è ["drum"]</pre>
+
+<h3 id="Rimuovere_2_elementi_dall'indice_0_e_inserire_parrot_anemone_e_blue">Rimuovere 2 elementi dall'indice 0 e inserire "parrot", "anemone" e "blue"</h3>
+
+<pre class="brush: js">var myFish = ['angel', 'clown', 'trumpet', 'sturgeon'];
+var removed = myFish.splice(0, 2, 'parrot', 'anemone', 'blue');
+
+// myFish è ["parrot", "anemone", "blue", "trumpet", "sturgeon"]
+// removed è ["angel", "clown"]</pre>
+
+<h3 id="Rimuovere_2_elementi_dall'indice_2">Rimuovere 2 elementi dall'indice 2</h3>
+
+<pre class="brush: js">var myFish = ['parrot', 'anemone', 'blue', 'trumpet', 'sturgeon'];
+var removed = myFish.splice(myFish.length - 3, 2);
+
+// myFish è ["parrot", "anemone", "sturgeon"]
+// removed è ["blue", "trumpet"]</pre>
+
+<h3 id="Rimuovere_1_elemento_dall'indice_-2">Rimuovere 1 elemento dall'indice -2</h3>
+
+<pre class="brush: js">var myFish = ['angel', 'clown', 'mandarin', 'sturgeon'];
+var removed = myFish.splice(-2, 1);
+
+// myFish è ["angel", "clown", "sturgeon"]
+// removed è ["mandarin"]</pre>
+
+<h3 id="Rimuovere_tutti_gli_elementi_dopo_l'indice_2_(incl.)">Rimuovere tutti gli elementi dopo l'indice 2 (incl.)</h3>
+
+<pre class="brush: js">var myFish = ['angel', 'clown', 'mandarin', 'sturgeon'];
+var removed = myFish.splice(2);
+
+// myFish è ["angel", "clown"]
+// removed è ["mandarin", "sturgeon"]</pre>
+
+<h2 id="Specifiche">Specifiche</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specifica</th>
+ <th scope="col">Stato</th>
+ <th scope="col">Commento</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES3')}}</td>
+ <td>{{Spec2('ES3')}}</td>
+ <td>Definizione iniziale Implementato in JavaScript 1.2.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES5.1', '#sec-15.4.4.12', 'Array.prototype.splice')}}</td>
+ <td>{{Spec2('ES5.1')}}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-array.prototype.splice', 'Array.prototype.splice')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.prototype.splice', 'Array.prototype.splice')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilità_con_i_browser">Compatibilità con i browser</h2>
+
+<div>
+
+
+<p>{{Compat("javascript.builtins.Array.splice")}}</p>
+</div>
+
+<h2 id="Vedi_anche">Vedi anche</h2>
+
+<ul>
+ <li>{{jsxref("Array.prototype.push()", "push()")}} / {{jsxref("Array.prototype.pop()", "pop()")}} — aggiunge/rimuove elementi dalla fine dell'array</li>
+ <li>{{jsxref("Array.prototype.unshift()", "unshift()")}} / {{jsxref("Array.prototype.shift()", "shift()")}} — aggiunge/rimuove elementi dall'inizio dell'array</li>
+ <li>{{jsxref("Array.prototype.concat()", "concat()")}} — restituisce un nuovo array composto da questo array unito ad altri array e/o valore/i</li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/tostring/index.html b/files/it/web/javascript/reference/global_objects/array/tostring/index.html
new file mode 100644
index 0000000000..a5b8dcaa1e
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/tostring/index.html
@@ -0,0 +1,80 @@
+---
+title: Array.prototype.toString()
+slug: Web/JavaScript/Reference/Global_Objects/Array/toString
+tags:
+ - Array
+ - JavaScript
+ - Prototype
+ - metodo
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/toString
+---
+<div>{{JSRef}}</div>
+
+<p>Il metodo <code><strong>toString()</strong></code> restituisce una stringa che rappresenta l'array specificato e i suoi elementi.</p>
+
+<div>{{EmbedInteractiveExample("pages/js/array-tostring.html")}}</div>
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox"><var>arr</var>.toString()</pre>
+
+<h3 id="Valore_di_ritorno">Valore di ritorno</h3>
+
+<p>Una stringa che rappresenta gli elementi dell'array.</p>
+
+<h2 id="Descrizione">Descrizione</h2>
+
+<p>L'oggetto {{jsxref("Array")}} sovrascrive il metodo <code>toString</code> di {{jsxref("Object")}}. Per gli oggetti Array, il metodo <code>toString</code> unisce l'array e restituisce una stringa contenente ciascun elemento dell'array separato da virgole.</p>
+
+<p>JavaScript chiama automaticamente il metodo <code>toString</code> quando un array deve essere rappresentato come un valore di testo o quando viene fatto riferimento a un array in una concatenazione di stringhe.</p>
+
+<h3 id="ECMAScript_5_semantics">ECMAScript 5 semantics</h3>
+
+<p>A partire da JavaScript 1.8.5 (Firefox 4) e coerente con la semantica ECMAScript 5th edition, il metodo <code>toString()</code> è generico e può essere utilizzato con qualsiasi oggetto. {{jsxref("Object.prototype.toString()")}} sarà chiamato e verrà restituito il valore risultante.</p>
+
+<h2 id="Specifiche">Specifiche</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specifica</th>
+ <th scope="col">Stato</th>
+ <th scope="col">Commento</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES1')}}</td>
+ <td>{{Spec2('ES1')}}</td>
+ <td>Definizione iniziale Implementato in JavaScript 1.1.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES5.1', '#sec-15.4.4.2', 'Array.prototype.toString')}}</td>
+ <td>{{Spec2('ES5.1')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-array.prototype.tostring', 'Array.prototype.toString')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.prototype.tostring', 'Array.prototype.toString')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilità_con_i_browser">Compatibilità con i browser</h2>
+
+<div>
+
+
+<p>{{Compat("javascript.builtins.Array.toString")}}</p>
+</div>
+
+<h2 id="Vedi_anche">Vedi anche</h2>
+
+<ul>
+ <li>{{jsxref("Array.prototype.join()")}}</li>
+ <li>{{jsxref("Object.prototype.toSource()")}}</li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/unshift/index.html b/files/it/web/javascript/reference/global_objects/array/unshift/index.html
new file mode 100644
index 0000000000..ca4597e973
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/unshift/index.html
@@ -0,0 +1,98 @@
+---
+title: Array.prototype.unshift()
+slug: Web/JavaScript/Reference/Global_Objects/Array/unshift
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/unshift
+---
+<div>{{JSRef}}</div>
+
+<div>Il metodo <strong><code>unshift()</code></strong> aggiunge uno o più elementi all'inizio di un array e restitusce la nuova lunghezza dell'array stesso.</div>
+
+<div> </div>
+
+<div>{{EmbedInteractiveExample("pages/js/array-unshift.html")}}</div>
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox"><var>arr</var>.unshift(<var>element1</var>[, ...[, <var>elementN</var>]])</pre>
+
+<h3 id="Parameters">Parameters</h3>
+
+<dl>
+ <dt><code>element<em>N</em></code></dt>
+ <dd>Gli elementi da aggiungere all'inizio dell'array.</dd>
+</dl>
+
+<h3 id="Return_value">Return value</h3>
+
+<dl>
+ <dd>La nuova proprietà {{jsxref("Array.length", "length")}} dell'oggetto su cui è stato chiamato il metodo.</dd>
+</dl>
+
+<h2 id="Descrizione">Descrizione</h2>
+
+<p>Il metodo <code>unshift</code> inserisce i valori passati come parametri all'inizio di un oggetto array-like.</p>
+
+<p><code>unshift</code> è instenzionalmente generico; questo metodo può essere {{jsxref("Function.call", "chiamato", "", 1)}} o {{jsxref("Function.apply", "applicato", "", 1)}} su oggetti che assomigliano ad un array. Oggetti che non contengono una proprietà <code>length</code> che rifletta l'ultimo di una serie di consecutive proprietà numeriche zero-based potrebbero non comportarsi in alcun modo significativo.</p>
+
+<h2 id="Esempi">Esempi</h2>
+
+<pre class="brush: js">var arr = [1, 2];
+
+arr.unshift(0); // result of call is 3, the new array length
+// arr is [0, 1, 2]
+
+arr.unshift(-2, -1); // = 5
+// arr is [-2, -1, 0, 1, 2]
+
+arr.unshift([-3]);
+// arr is [[-3], -2, -1, 0, 1, 2]
+</pre>
+
+<h2 id="Specifications">Specifications</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES3')}}</td>
+ <td>{{Spec2('ES3')}}</td>
+ <td>Initial definition. Implemented in JavaScript 1.2.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES5.1', '#sec-15.4.4.13', 'Array.prototype.unshift')}}</td>
+ <td>{{Spec2('ES5.1')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-array.prototype.unshift', 'Array.prototype.unshift')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.prototype.unshift', 'Array.prototype.unshift')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+<div>
+
+
+<p>{{Compat("javascript.builtins.Array.unshift")}}</p>
+</div>
+
+<h2 id="See_also">See also</h2>
+
+<ul>
+ <li>{{jsxref("Array.prototype.push()")}}</li>
+ <li>{{jsxref("Array.prototype.pop()")}}</li>
+ <li>{{jsxref("Array.prototype.shift()")}}</li>
+ <li>{{jsxref("Array.prototype.concat()")}}</li>
+</ul>
diff --git a/files/it/web/javascript/reference/global_objects/array/values/index.html b/files/it/web/javascript/reference/global_objects/array/values/index.html
new file mode 100644
index 0000000000..f3019ef144
--- /dev/null
+++ b/files/it/web/javascript/reference/global_objects/array/values/index.html
@@ -0,0 +1,87 @@
+---
+title: Array.prototype.values()
+slug: Web/JavaScript/Reference/Global_Objects/Array/values
+translation_of: Web/JavaScript/Reference/Global_Objects/Array/values
+---
+<div>{{JSRef}}</div>
+
+<p> </p>
+
+<p><code style=""><font face="Arial, x-locale-body, sans-serif"><span style="background-color: #ffffff;">Il metodo </span></font><strong>values()</strong></code> restituisce un nuovo oggetto <strong><code>Array Iterator</code></strong> che contiene i valori per ogni indice nell'array.</p>
+
+<p>{{EmbedInteractiveExample("pages/js/array-values.html")}}</p>
+
+<pre class="brush: js">var a = ['a', 'b', 'c', 'd', 'e'];
+var iterator = a.values();
+
+console.log(iterator.next().value); // a
+console.log(iterator.next().value); // b
+console.log(iterator.next().value); // c
+console.log(iterator.next().value); // d
+console.log(iterator.next().value); // e</pre>
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox"><var>arr</var>.values()</pre>
+
+<h3 id="Valore_di_ritorno">Valore di ritorno</h3>
+
+<p>Un nuovo oggetto iteratore {{jsxref("Array")}}.</p>
+
+<h2 id="Esempi">Esempi</h2>
+
+<h3 id="Iterazione_utilizzando_il_for...of_loop">Iterazione utilizzando il  <code><a href="/en-US/docs/Web/JavaScript/Reference/Statements/for...of">for...of</a></code> loop</h3>
+
+<pre class="brush: js">var arr = ['a', 'b', 'c', 'd', 'e'];
+var iterator = arr.values();
+
+for (let letter of iterator) {
+ console.log(letter);
+}
+</pre>
+
+<p><strong>Array.prototype.values</strong> è una implementazionde di default di <strong>Array.prototype[Symbol.iterator]</strong>.</p>
+
+<pre>Array.prototype.values === Array.prototype[Symbol.iterator] //true</pre>
+
+<p><strong>TODO</strong>: please write about why we need it, use cases.</p>
+
+<h2 id="Specificazioni">Specificazioni</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES2015', '#sec-array.prototype.values', 'Array.prototype.values')}}</td>
+ <td>{{Spec2('ES2015')}}</td>
+ <td>Definizione iniziale.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-array.prototype.values', 'Array.prototype.values')}}</td>
+ <td>{{Spec2('ESDraft')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+<div>
+
+
+<p>{{Compat("javascript.builtins.Array.values")}}</p>
+</div>
+
+<h2 id="See_also">See also</h2>
+
+<ul>
+ <li>{{jsxref("Array.prototype.keys()")}}</li>
+ <li>{{jsxref("Array.prototype.entries()")}}</li>
+ <li>{{jsxref("Array.prototype.forEach()")}}</li>
+ <li>{{jsxref("Array.prototype.every()")}}</li>
+ <li>{{jsxref("Array.prototype.some()")}}</li>
+</ul>