-1
Well I am trying to execute this function and results in Nan, not even an error in the console.
var numeros = [10,2,5,,30,25,19,20,50,40,150]
function media(nums) {
var tam = nums.lenght
var soma = 0
for (var i = 0; i < tam; i++) {
soma += nums[i]
}
return Math.round(soma/tam)
}
document.write(media(numeros))