chore(i18n,curriculum): processed translations (#43435)

This commit is contained in:
camperbot
2021-09-13 07:13:43 -07:00
committed by GitHub
parent 8d33ff21f4
commit 3d50ac03ad
27 changed files with 119 additions and 113 deletions

View File

@ -1,6 +1,6 @@
---
id: 8d5823c8c441eddfaeb5bdef
title: Create a Map Data Structure
title: Crea una struttura dati Mappa
challengeType: 1
forumTopicId: 301629
dashedName: create-a-map-data-structure
@ -8,25 +8,25 @@ dashedName: create-a-map-data-structure
# --description--
The next few challenges will cover maps and hash tables. Maps are data structures that store key-value pairs. In JavaScript, these are available to us as objects. Maps provide rapid lookup of stored items based on key values and are very common and useful data structures.
Le prossime sfide riguarderanno mappe e tabelle di hash. Le mappe sono strutture dati che memorizzano coppie chiave-valore. In JavaScript, questi sono disponibili per noi come oggetti. Le mappe forniscono una rapida ricerca degli elementi memorizzati in base ai valori delle chiavi (key) e sono strutture di dati molto comuni e utili.
# --instructions--
Let's get some practice creating our own map. Because JavaScript objects provide a much more efficient map structure than anything we could write here, this is intended primarily as a learning exercise. However, JavaScript objects only provide us with certain operations. What if we wanted to define custom operations? Use the `Map` object provided here as a wrapper around a JavaScript `object`. Create the following methods and operations on the Map object:
Facciamo un po' di pratica nel creare la nostra mappa. Poiché gli oggetti JavaScript forniscono una struttura di mappa molto più efficiente di qualsiasi cosa potremmo scrivere qui, questo è inteso principalmente come un esercizio di apprendimento. Tuttavia, gli oggetti JavaScript ci forniscono solo determinate operazioni. E se volessimo definire operazioni personalizzate? Utilizzare l'oggetto `Map` fornito qui come un wrapper intorno a un `object` di JavaScript. Creare i seguenti metodi e operazioni sull'oggetto mappa:
<ul>
<li><code>add</code> accepts a <code>key, value</code> pair to add to the map.</li>
<li><code>remove</code> accepts a key and removes the associated <code>key, value</code> pair</li>
<li><code>get</code> accepts a <code>key</code> and returns the stored <code>value</code></li>
<li><code>has</code> accepts a <code>key</code> and returns <dfn>true</dfn> if the key exists or <dfn>false</dfn> if it doesn't.</li>
<li><code>values</code> returns an array of all the values in the map</li>
<li><code>size</code> returns the number of items in the map</li>
<li><code>clear</code> empties the map</li>
<li><code>add</code> accetta una coppia <code>key, value</code> da aggiungere alla mappa.</li>
<li><code>remove</code> accetta una chiave e rimuove la coppia <code>key, value</code> associata</li>
<li><code>get</code> accetta una <code>key</code> e ritorna il <code>value</code> memorizzato</li>
<li><code>has</code> accetta una <code>key</code> e restituisce <dfn>true</dfn> se la chiave esiste o <dfn>false</dfn> se non esiste.</li>
<li><code>values</code> restituisce un array di tutti i valori nella mappa</li>
<li><code>size</code> restituisce il numero di elementi nella mappa</li>
<li><code>clear</code> svuota la mappa</li>
</ul>
# --hints--
The Map data structure should exist.
La struttura di dati Mappa dovrebbe esistere.
```js
assert(
@ -40,7 +40,7 @@ assert(
);
```
The Map object should have the following methods: add, remove, get, has, values, clear, and size.
L'oggetto Map dovrebbe avere i seguenti metodi: add, remove, get, has, values, clear e size.
```js
assert(
@ -62,7 +62,7 @@ assert(
);
```
The add method should add items to the map.
Il metodo add dovrebbe aggiungere oggetti alla mappa.
```js
assert(
@ -79,7 +79,7 @@ assert(
);
```
The has method should return true for added items and false for absent items.
Il metodo has dovrebbe restituire true per elementi esistenti e false per oggetti non esistenti.
```js
assert(
@ -94,7 +94,7 @@ assert(
);
```
The get method should accept keys as input and should return the associated values.
Il metodo get dovrebbe accettare delle chiavi come input e dovrebbe restituire i valori associati.
```js
assert(
@ -109,7 +109,7 @@ assert(
);
```
The values method should return all the values stored in the map as strings in an array.
Il metodo values dovrebbe restituire tutti i valori immagazzinati nella mappa come stringhe in un array.
```js
assert(
@ -131,7 +131,7 @@ assert(
);
```
The clear method should empty the map and the size method should return the number of items present in the map.
Il metodo clear dovrebbe svuotare la mappa e il metodo size dovrebbe restituire il numeri di oggetti presenti nella mappa.
```js
assert(

View File

@ -1,6 +1,6 @@
---
id: 587d8254367417b2b2512c6f
title: Perform a Subset Check on Two Sets of Data
title: Eseguire un controllo di sottoinsieme su due insiemi di dati
challengeType: 1
forumTopicId: 301707
dashedName: perform-a-subset-check-on-two-sets-of-data
@ -8,13 +8,13 @@ dashedName: perform-a-subset-check-on-two-sets-of-data
# --description--
In this exercise, we are going to perform a subset test on 2 sets of data. We will create a method on our `Set` data structure called `isSubsetOf`. This will compare the first set against the second, and if the first set is fully contained within the second, it will return `true`.
In questo esercizio, eseguiremo un test subset su 2 set di dati. Creeremo un metodo sulla nostra struttura di dati `Set` chiamato `isSubsetOf`. Questo confronterà il primo set con il secondo, e se il primo set è pienamente contenuto nel secondo, restituirà `true`.
For example, if `setA = ['a','b']` and `setB = ['a','b','c','d']`, then `setA` is a subset of `setB`, so `setA.isSubsetOf(setB)` should return `true`.
Per esempio, se `setA = ['a','b']` e `setB = ['a','b','c','d']`, allora `setA` è un subset di `setB`, quindi `setA.isSubsetOf(setB)` dovrebbe restituire `true`.
# --hints--
Your `Set` class should have a `isSubsetOf` method.
La tua classe `Set` dovrebbe avere un metodo `isSubsetOf`.
```js
assert(
@ -25,7 +25,7 @@ assert(
);
```
The first Set() should be contained in the second Set
Il primo Set() dovrebbe essere contenuto nel secondo Set
```js
assert(
@ -43,7 +43,7 @@ assert(
);
```
`['a', 'b'].isSubsetOf(['a', 'b', 'c', 'd'])` should return `true`
`['a', 'b'].isSubsetOf(['a', 'b', 'c', 'd'])` dovrebbe restituire `true`
```js
assert(
@ -62,7 +62,7 @@ assert(
);
```
`['a', 'b', 'c'].isSubsetOf(['a', 'b'])` should return `false`
`['a', 'b', 'c'].isSubsetOf(['a', 'b'])` dovrebbe restituire `false`
```js
assert(
@ -80,7 +80,7 @@ assert(
);
```
`[].isSubsetOf([])` should return `true`
`[].isSubsetOf([])` dovrebbe restituire `true`
```js
assert(
@ -93,7 +93,7 @@ assert(
);
```
`['a', 'b'].isSubsetOf(['c', 'd'])` should return `false`
`['a', 'b'].isSubsetOf(['c', 'd'])` dovrebbe restituire `false`
```js
assert(