You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: Italian/07_Day_Functions/07_day_functions.md
+25-25
Original file line number
Diff line number
Diff line change
@@ -594,23 +594,23 @@ Verrà trattato in un'altra sezione.
594
594
The number of evens are 51.
595
595
```
596
596
597
-
14.Write a function which takes any number of arguments and return the sum of the arguments
597
+
14.Scrivere una funzione che accetta un numero qualsiasi di argomenti e restituisce la somma degli argomenti.
598
598
599
599
```js
600
600
sum(1, 2, 3) // -> 6
601
601
sum(1, 2, 3, 4) // -> 10
602
602
```
603
603
604
-
15. Writ a function which generates a _randomUserIp_.
605
-
16. Write a function which generates a _randomMacAddress_
606
-
17. Declare a function name _randomHexaNumberGenerator_. When this function is called it generates a random hexadecimal number. The function return the hexadecimal number.
604
+
15.Scrivere una funzione che generi un _randomUserIp_.
605
+
16.Scrivere una funzione che generi un _randomMacAddress_.
606
+
17.Dichiarare il nome di una funzione _randomHexaNumberGenerator_. Quando questa funzione viene chiamata, genera un numero esadecimale casuale. La funzione restituisce il numero esadecimale.
607
607
608
608
```sh
609
609
console.log(randomHexaNumberGenerator());
610
610
'#ee33df'
611
611
```
612
612
613
-
18. Declare a function name _userIdGenerator_. When this function is called it generates seven character id. The function return the id.
613
+
18.Dichiarare il nome della funzione _userIdGenerator_. Quando questa funzione viene chiamata, genera un id di sette caratteri. La funzione restituisce l'id.
614
614
615
615
```sh
616
616
console.log(userIdGenerator());
@@ -619,7 +619,7 @@ Verrà trattato in un'altra sezione.
619
619
620
620
### Esercizi: Livello 3
621
621
622
-
1. Modify the _userIdGenerator_ function. Declare a function name _userIdGeneratedByUser_. It doesn’t take any parameter but it takes two inputs using prompt(). One of the input is the number of characters and the second input is the number of ids which are supposed to be generated.
622
+
1. Modificare la funzione _userIdGenerator_. Dichiarare il nome della funzione _userIdGeneratedByUser_. Non accetta alcun parametro, ma prende due input tramite prompt(). Uno di questi è il numero di caratteri e il secondo è il numero di ID che devono essere generati.
623
623
624
624
```sh
625
625
userIdGeneratedByUser()
@@ -638,18 +638,18 @@ Verrà trattato in un'altra sezione.
638
638
'
639
639
```
640
640
641
-
2. Write a function name _rgbColorGenerator_ and it generates rgb colors.
641
+
2. Scrivete una funzione chiamata _rgbColorGenerator_ che genera i colori rgb.
642
642
643
643
```sh
644
644
rgbColorGenerator()
645
645
rgb(125,244,255)
646
646
```
647
647
648
-
3. Write a function **_arrayOfHexaColors_** which return any number of hexadecimal colors in an array.
649
-
4. Write a function **_arrayOfRgbColors_** which return any number of RGB colors in an array.
650
-
5. Write a function **_convertHexaToRgb_** which converts hexa color to rgb and it returns an rgb color.
651
-
6. Write a function **_convertRgbToHexa_** which converts rgb to hexa color and it returns an hexa color.
652
-
7. Write a function **_generateColors_** which can generate any number of hexa or rgb colors.
648
+
3. Scrivere una funzione **_arrayOfHexaColors_** che restituisca un numero qualsiasi di colori esadecimali in un array.
649
+
4. Scrivete una funzione **_arrayOfRgbColors_** che restituisca un numero qualsiasi di colori RGB in una matrice.
650
+
5. Scrivere una funzione **_convertHexaToRgb_** che converta il colore hexa in rgb e restituisca un colore rgb.
651
+
6. Scrivere una funzione **_convertRgbToHexa_** che converta il colore rgb in hexa e restituisca un colore hexa.
652
+
7. Scrivere una funzione **_generateColors_** che possa generare un numero qualsiasi di colori hexa o rgb.
8. Call your function _shuffleArray_, it takes an array as a parameter and it returns a shuffled array
662
-
9. Call your function _factorial_, it takes a whole number as a parameter and it return a factorial of the number
663
-
10. Call your function _isEmpty_, it takes a parameter and it checks if it is empty or not
664
-
11. Call your function _sum_, it takes any number of arguments and it returns the sum.
665
-
12. Write a function called _sumOfArrayItems_, it takes an array parameter and return the sum of all the items. Check if all the array items are number types. If not give return reasonable feedback.
666
-
13. Write a function called _average_, it takes an array parameter and returns the average of the items. Check if all the array items are number types. If not give return reasonable feedback.
667
-
14. Write a function called _modifyArray_ takes array as parameter and modifies the fifth item of the array and return the array. If the array length is less than five it return 'item not found'.
661
+
8. Chiamare la funzione _shuffleArray_, che prende un array come parametro e restituisce un array mescolato.
662
+
9. Chiamate la vostra funzione _factorial_, che prende un numero intero come parametro e restituisce un fattoriale del numero
663
+
10. Chiamate la funzione _isEmpty_, che prende un parametro e controlla se è vuoto o meno.
664
+
11. Chiamate la funzione _sum_, che accetta un numero qualsiasi di argomenti e restituisce la somma.
665
+
12. Scrivete una funzione chiamata _sumOfArrayItems_, che accetta un parametro dell'array e restituisce la somma di tutti gli elementi. Verificare se tutti gli elementi dell'array sono di tipo numero. In caso contrario, restituire un feedback ragionevole.
666
+
13. Scrivete una funzione chiamata _media_, che accetta un parametro di array e restituisce la media degli elementi. Verificate se tutti gli elementi dell'array sono di tipo numero. In caso contrario, restituire un feedback ragionevole.
667
+
14.Scrivere una funzione chiamata _modifyArray_ che prenda come parametro un array e modifichi il quinto elemento dell'array e restituisca l'array. Se la lunghezza dell'array è inferiore a cinque, restituisce "elemento non trovato".
@@ -690,18 +690,18 @@ Verrà trattato in un'altra sezione.
690
690
'Not Found'
691
691
```
692
692
693
-
15. Write a function called _isPrime_, which checks if a number is prime number.
694
-
16. Write a functions which checks if all items are unique in the array.
695
-
17. Write a function which checks if all the items of the array are the same data type.
696
-
18. JavaScript variable name does not support special characters or symbols except \$ or \_. Write a function **isValidVariable** which check if a variable is valid or invalid variable.
697
-
19. Write a function which returns array of seven random numbers in a range of 0-9. All the numbers must be unique.
693
+
15. Scrivere una funzione chiamata _isPrime_, che verifichi se un numero è un numero primo.
694
+
16. Scrivete una funzione che verifichi se tutti gli elementi sono unici nell'array.
695
+
17.Scrivete una funzione che verifichi se tutti gli elementi dell'array sono dello stesso tipo di dati.
696
+
18. Il nome della variabile JavaScript non supporta caratteri speciali o simboli, tranne \$o\_. Scrivete una funzione **isValidVariable** che controlli se una variabile è valida o non valida.
697
+
19. Scrivete una funzione che restituisca un array di sette numeri casuali in un intervallo compreso tra 0 e 9. Tutti i numeri devono essere unici. Tutti i numeri devono essere unici.
698
698
699
699
```js
700
700
sevenRandomNumbers()
701
701
[(1, 4, 5, 7, 9, 8, 0)]
702
702
```
703
703
704
-
20. Write a function called reverseCountries, it takes countries array and first it copy the array and returns the reverse of the original array
704
+
20. Scrivere una funzione chiamata reverseCountries, che prenda un array di paesi e prima copi l'array e restituisca l'inverso dell'array originale.
0 commit comments