Created
August 8, 2022 13:43
-
-
Save eimkasp/177bb68258b06c76ec48742cdad30527 to your computer and use it in GitHub Desktop.
Javascript Test Užduoties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Suraskite didžiausią skaičių masyve | |
// 2. Suskaičiuokite skaičių vidurkį. | |
var array = [3 , 6, 2, 56, 32, 5, 89, 32]; | |
var largest= 0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Le total = 0;
for(let i = 0; i < array.length; i++) {
total += array[i];
}
let average = total / array.length;
}
return average;