chore(i18n,learn): processed translations (#44936)

This commit is contained in:
camperbot
2022-01-27 22:09:01 +05:30
committed by GitHub
parent cb02d1d130
commit c34ee8748a
30 changed files with 710 additions and 71 deletions

View File

@ -10,7 +10,7 @@ dashedName: create-complex-multi-dimensional-arrays
Ottimo! Hai appena imparato un sacco di cose sugli array! Questa è stata una panoramica di livello abbastanza alto, e c'è ancora molto da imparare per lavorare con gli array, come potrai vedere nelle prossime sezioni. Ma prima di passare a studiare gli <dfn>oggetti</dfn>, diamo un'altra occhiata e vediamo come gli array possono diventare un po' più complessi di quello che abbiamo visto nelle sfide precedenti.
Una delle caratteristiche più potenti quando si pensa agli array come strutture di dati, è che gli array possono contenere, o anche essere completamente costituiti da altri array. Abbiamo visto array che contengono altri array nelle sfide precedenti, ma erano abbastanza semplici. Tuttavia, gli array possono contenere una profondità infinita di array che possono contenere altri array, ciascuno con i propri livelli arbitrari di profondità, e così via. In questo modo, un array può diventare molto rapidamente una struttura di dati molto complessa, conosciuta come un array <dfn>multi-dimensionale</dfn> o un array annidato. Considera l'esempio seguente:
Una delle caratteristiche più potenti quando si pensa agli array come strutture di dati, è che gli array possono contenere, o anche essere completamente costituiti da altri array. Abbiamo visto array che contengono altri array nelle sfide precedenti, ma erano abbastanza semplici. Tuttavia, gli array possono contenere una profondità infinita di array che possono contenere altri array, ciascuno con i propri livelli arbitrari di profondità, e così via. In questo modo, un array può diventare in fretta una struttura dati molto complessa, nota come <dfn>multi-dimensionale</dfn>, o array annidato. Considera l'esempio seguente:
```js
let nestedArray = [

View File

@ -25,7 +25,7 @@ NON includere virgolette (singole o doppie) nell'output.
# --hints--
La sequenza di carte 2, 3, 4, 5, 6 dovrebbero restituire `5 Bet`
La sequenza di carte 2, 3, 4, 5, 6 dovrebbe restituire la stringa `5 Bet`
```js
assert(
@ -61,7 +61,7 @@ assert(
);
```
La sequenza di carte 10, J, Q, K, A dovrebbero restituire la stringa `-5 Hold`
La sequenza di carte 10, J, Q, K, A dovrebbe restituire la stringa `-5 Hold`
```js
assert(
@ -80,7 +80,7 @@ assert(
);
```
La sequenza di carte 3, 7, Q, 8, A dovrebbero restituire la stringa `-1 Hold`
La sequenza di carte 3, 7, Q, 8, A dovrebbe restituire la stringa `-1 Hold`
```js
assert(
@ -99,7 +99,7 @@ assert(
);
```
La sequenza di carte 2, J, 9, 2, 7 dovrebbero restituire la stringa `1 Bet`
La sequenza di carte 2, J, 9, 2, 7 dovrebbe restituire la stringa `1 Bet`
```js
assert(
@ -118,7 +118,7 @@ assert(
);
```
La sequenza di carte 2, 2, 10 dovrebbero restituire la stringa `1 Bet`
La sequenza di carte 2, 2, 10 dovrebbe restituire la stringa `1 Bet`
```js
assert(

View File

@ -27,6 +27,7 @@ Riscrivi il codice in modo che l'array globale `bookList` non venga modificato a
`bookList` non dovrebbe cambiare e dovrebbe rimanere uguale a `["The Hound of the Baskervilles", "On The Electrodynamics of Moving Bodies", "Philosophiæ Naturalis Principia Mathematica", "Disquisitiones Arithmeticae"]`.
```js
add(bookList, "Test");
assert(
JSON.stringify(bookList) ===
JSON.stringify([
@ -38,11 +39,11 @@ assert(
);
```
`newBookList` dovrebbe essere uguale a `["The Hound of the Baskervilles", "On The Electrodynamics of Moving Bodies", "Philosophiæ Naturalis Principia Mathematica", "Disquisitiones Arithmeticae", "A Brief History of Time"]`.
`add(bookList, "A Brief History of Time")` dovrebbe restituire `["The Hound of the Baskervilles", "On The Electrodynamics of Moving Bodies", "Philosophiæ Naturalis Principia Mathematica", "Disquisitiones Arithmeticae", "A Brief History of Time"]`.
```js
assert(
JSON.stringify(newBookList) ===
JSON.stringify(add(bookList, "A Brief History of Time")) ===
JSON.stringify([
'The Hound of the Baskervilles',
'On The Electrodynamics of Moving Bodies',
@ -53,11 +54,11 @@ assert(
);
```
`newerBookList` dovrebbe essere uguale a `["The Hound of the Baskervilles", "Philosophiæ Naturalis Principia Mathematica", "Disquisitiones Arithmeticae"]`.
`remove(bookList, "On The Electrodynamics of Moving Bodies")` dovrebbe restituire `["The Hound of the Baskervilles", "Philosophiæ Naturalis Principia Mathematica", "Disquisitiones Arithmeticae"]`.
```js
assert(
JSON.stringify(newerBookList) ===
JSON.stringify(remove(bookList, 'On The Electrodynamics of Moving Bodies')) ===
JSON.stringify([
'The Hound of the Baskervilles',
'Philosophiæ Naturalis Principia Mathematica',
@ -66,11 +67,11 @@ assert(
);
```
`newestBookList` dovrebbe essere uguale a `["The Hound of the Baskervilles", "Philosophiæ Naturalis Principia Mathematica", "Disquisitiones Arithmeticae", "A Brief History of Time"]`.
`remove(add(bookList, "A Brief History of Time"), "On The Electrodynamics of Moving Bodies");` dovrebbe essere uguale a `["The Hound of the Baskervilles", "Philosophiæ Naturalis Principia Mathematica", "Disquisitiones Arithmeticae", "A Brief History of Time"]`.
```js
assert(
JSON.stringify(newestBookList) ===
JSON.stringify(remove(add(bookList, 'A Brief History of Time'), 'On The Electrodynamics of Moving Bodies')) ===
JSON.stringify([
'The Hound of the Baskervilles',
'Philosophiæ Naturalis Principia Mathematica',
@ -108,12 +109,6 @@ function remove(bookName) {
// Change code above this line
}
}
const newBookList = add(bookList, 'A Brief History of Time');
const newerBookList = remove(bookList, 'On The Electrodynamics of Moving Bodies');
const newestBookList = remove(add(bookList, 'A Brief History of Time'), 'On The Electrodynamics of Moving Bodies');
console.log(bookList);
```
# --solutions--
@ -134,8 +129,4 @@ function remove(bookList, bookName) {
}
return bookListCopy;
}
const newBookList = add(bookList, 'A Brief History of Time');
const newerBookList = remove(bookList, 'On The Electrodynamics of Moving Bodies');
const newestBookList = remove(add(bookList, 'A Brief History of Time'), 'On The Electrodynamics of Moving Bodies');
```