mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-25 14:01:44 -04:00
chore(i18n,learn): processed translations (#49906)
This commit is contained in:
@@ -32,7 +32,7 @@ assert(/4\.40*\s*\/\s*2\.*0*/.test(code));
|
||||
La variabile quotient deve essere assegnata solo una volta
|
||||
|
||||
```js
|
||||
assert(code.match(/quotient/g).length === 1);
|
||||
assert(code.match(/quotient\s*=/g).length === 1);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
@@ -8,28 +8,28 @@ dashedName: record-collection
|
||||
|
||||
# --description--
|
||||
|
||||
You are creating a function that aids in the maintenance of a musical album collection. The collection is organized as an object that contains multiple albums which are also objects. Each album is represented in the collection with a unique `id` as the property name. Within each album object, there are various properties describing information about the album. Not all albums have complete information.
|
||||
Stai creando una funzione che facilita la manutenzione di una collezione di album musicali. La collezione è organizzata come un oggetto che contiene più album i quali sono anch'essi oggetti. Ogni album è rappresentato nella collezione con un `id` unico come nome della proprietà. All'interno di ogni oggetto dell'album, ci sono varie proprietà che danno informazioni sull'album. Non tutti gli album hanno informazioni complete.
|
||||
|
||||
The `updateRecords` function takes 4 arguments represented by the following function parameters:
|
||||
La funzione `updateRecords` prende 4 argomenti rappresentati dai seguenti parametri di funzione:
|
||||
|
||||
- `records` - an object containing several individual albums
|
||||
- `id` - a number representing a specific album in the `records` object
|
||||
- `prop` - a string representing the name of the album’s property to update
|
||||
- `value` - a string containing the information used to update the album’s property
|
||||
- `records` - un oggetto contenente diversi album
|
||||
- `id` - un numero che rappresenta un album specifico nell'oggetto `records`
|
||||
- `prop` - una stringa che rappresenta il nome della proprietà dell'album da aggiornare
|
||||
- `value` - una stringa contenente le informazioni usate per aggiornare la proprietà dell'album
|
||||
|
||||
Complete the function using the rules below to modify the object passed to the function.
|
||||
Completa la funzione usando le regole sottostanti per modificare l'oggetto passato alla funzione.
|
||||
|
||||
- Your function must always return the entire `records` object.
|
||||
- If `value` is an empty string, delete the given `prop` property from the album.
|
||||
- If `prop` isn’t `"tracks"` and `value` isn't an empty string, assign the `value` to that album’s `prop`.
|
||||
- If `prop` is `"tracks"` and `value` isn’t an empty string, add the `value` to the end of the album’s existing `"tracks"` array.
|
||||
- If the album doesn’t have a `"tracks"` property, create a new array for the album's `"tracks"` property before adding the `value` to it.
|
||||
- La funzione deve sempre restituire l'intero oggetto `records`.
|
||||
- Se `value` è una stringa vuota, elimina la proprietà `prop` dall'album.
|
||||
- Se `prop` non è `"tracks"` e `value` non è una stringa vuota, assegna `value` alla `prop` di quell'album.
|
||||
- Se `prop` è `"tracks"` e `value` non è una stringa vuota, aggiungi `value` alla fine dell'array `"tracks"` già esistente dell'album.
|
||||
- Se l'album non ha una proprietà `"tracks"` crea un nuovo array per la proprietà `"tracks"` dell'album prima di aggiungervi `value`.
|
||||
|
||||
**Note:** A copy of the `recordCollection` object is used for the tests. You should not directly modify the `recordCollection` object.
|
||||
**Nota:** una copia dell'oggetto `recordCollection` viene utilizzata per i test. Non dovresti modificare direttamente l'oggetto `recordCollection`.
|
||||
|
||||
# --hints--
|
||||
|
||||
After `updateRecords(recordCollection, 5439, "artist", "ABBA")`, `artist` should be the string `ABBA`
|
||||
Dopo aver eseguito `updateRecords(recordCollection, 5439, "artist", "ABBA")`, `artist` dovrebbe essere la stringa `ABBA`
|
||||
|
||||
```js
|
||||
assert(
|
||||
@@ -38,7 +38,7 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
After `updateRecords(recordCollection, 5439, "tracks", "Take a Chance on Me")`, `tracks` should have the string `Take a Chance on Me` as the last and only element.
|
||||
Dopo `updateRecords(recordCollection, 5439, "tracks", "Take a Chance on Me")`, `tracks` dovrebbe avere la stringa `Take a Chance on Me` come solo e ultimo elemento.
|
||||
|
||||
```js
|
||||
assert(
|
||||
@@ -48,14 +48,14 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
After `updateRecords(recordCollection, 2548, "artist", "")`, `artist` should not be set
|
||||
Dopo `updateRecords(recordCollection, 2548, "artist", "")`, `artist` non dovrebbe essere impostato
|
||||
|
||||
```js
|
||||
updateRecords(_recordCollection, 2548, 'artist', '');
|
||||
assert(!_recordCollection[2548].hasOwnProperty('artist'));
|
||||
```
|
||||
|
||||
After `updateRecords(recordCollection, 1245, "tracks", "Addicted to Love")`, `tracks` should have the string `Addicted to Love` as the last element.
|
||||
Dopo `updateRecords(recordCollection, 1245, "tracks", "Addicted to Love")`, `tracks` dovrebbe avere la stringa `Addicted to Love` come ultimo elemento.
|
||||
|
||||
```js
|
||||
assert(
|
||||
@@ -65,7 +65,7 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
After `updateRecords(recordCollection, 2468, "tracks", "Free")`, `tracks` should have the string `1999` as the first element.
|
||||
Dopo `updateRecords(recordCollection, 2468, "tracks", "Free")`, `tracks` dovrebbe avere la stringa `1999` come primo elemento.
|
||||
|
||||
```js
|
||||
assert(
|
||||
@@ -75,14 +75,14 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
After `updateRecords(recordCollection, 2548, "tracks", "")`, `tracks` should not be set
|
||||
Dopo `updateRecords(recordCollection, 2548, "tracks", "")`, `tracks` non dovrebbe essere impostato
|
||||
|
||||
```js
|
||||
updateRecords(_recordCollection, 2548, 'tracks', '');
|
||||
assert(!_recordCollection[2548].hasOwnProperty('tracks'));
|
||||
```
|
||||
|
||||
After `updateRecords(recordCollection, 1245, "albumTitle", "Riptide")`, `albumTitle` should be the string `Riptide`
|
||||
Dopo `updateRecords(recordCollection, 1245, "albumTitle", "Riptide")`, `albumTitle` dovrebbe essere la stringa `Riptide`
|
||||
|
||||
```js
|
||||
assert(
|
||||
|
||||
@@ -11,13 +11,13 @@ dashedName: word-blanks
|
||||
|
||||
Ti vengono date delle frasi con delle parole mancanti, come nomi, verbi, aggettivi e avverbi. Devi quindi riempire le parti mancanti con parole a tua scelta in modo che la frase completata abbia senso.
|
||||
|
||||
Consider this sentence:
|
||||
Considera questa frase:
|
||||
|
||||
```md
|
||||
It was really ____, and we ____ ourselves ____.
|
||||
```
|
||||
|
||||
This sentence has three missing pieces- an adjective, a verb and an adverb, and we can add words of our choice to complete it. We can then assign the completed sentence to a variable as follows:
|
||||
Questa frase ha tre parti mancanti - un aggettivo, un verbo e un avverbio, e possiamo aggiungere parole di nostra scelta per completarla. Possiamo quindi assegnare la frase completata a una variabile come segue:
|
||||
|
||||
```js
|
||||
const sentence = "It was really " + "hot" + ", and we " + "laughed" + " ourselves " + "silly" + ".";
|
||||
@@ -25,21 +25,21 @@ const sentence = "It was really " + "hot" + ", and we " + "laughed" + " ourselve
|
||||
|
||||
# --instructions--
|
||||
|
||||
In this challenge, we provide you with a noun, a verb, an adjective and an adverb. You need to form a complete sentence using words of your choice, along with the words we provide.
|
||||
In questa sfida, ti forniremo un sostantivo, un verbo, un aggettivo e un avverbio. Dovrai formare una frase completa utilizzando parole di tua scelta, insieme con le parole che ti forniremo.
|
||||
|
||||
You will need to use the string concatenation operator `+` to build a new string, using the provided variables: `myNoun`, `myAdjective`, `myVerb`, and `myAdverb`. You will then assign the formed string to the `wordBlanks` variable. You should not change the words assigned to the variables.
|
||||
Dovrai usare l'operatore di concatenazione delle stringhe `+` per creare una nuova stringa, utilizzando le variabili fornite: `myNoun`, `myAdjective`, `myVerb` e `myAdverb`. Assegnerai quindi la stringa costruita alla variabile `wordBlanks`. Non dovrai cambiare le parole assegnate alle variabili.
|
||||
|
||||
You will also need to account for spaces in your string, so that the final sentence has spaces between all the words. The result should be a complete sentence.
|
||||
Nella tua stringa dovrai anche tenere conto degli spazi, in modo che la frase finale abbia degli spazi tra tutte le parole. Il risultato dovrebbe essere una frase completa.
|
||||
|
||||
# --hints--
|
||||
|
||||
`wordBlanks` should be a string.
|
||||
`wordBlanks` dovrebbe essere una stringa.
|
||||
|
||||
```js
|
||||
assert(typeof wordBlanks === 'string');
|
||||
```
|
||||
|
||||
You should not change the values assigned to `myNoun`, `myVerb`, `myAdjective` or `myAdverb`.
|
||||
Non dovresti modificare i valori assegnati a `myNoun`, `myVerb`, `myAdjective` o `myAdverb`.
|
||||
|
||||
```js
|
||||
assert(
|
||||
@@ -50,7 +50,7 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
You should not directly use the values `dog`, `ran`, `big`, or `quickly` to create `wordBlanks`.
|
||||
Non dovresti usare direttamente i valori `dog`, `ran`, `big` o `quickly` per creare `wordBlanks`.
|
||||
|
||||
```js
|
||||
const newCode = removeAssignments(code);
|
||||
@@ -62,7 +62,7 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
`wordBlanks` should contain all of the words assigned to the variables `myNoun`, `myVerb`, `myAdjective` and `myAdverb` separated by non-word characters (and any additional words of your choice).
|
||||
`wordBlanks` dovrebbe contenere tutte le parole assegnate alle variabili `myNoun`, `myVerb`, `myAdjective` e `myAdverb` separate da caratteri che non siano parole (e da eventuali parole di tua scelta).
|
||||
|
||||
```js
|
||||
assert(
|
||||
|
||||
Reference in New Issue
Block a user