Var arr=[4000500, 0140, 00900];
Var getAvg=function (array) {
Var len=array. Lenght;
Var sum=0;
for(var i=0; iThe sum +=array [I];
}
Return the sum/len;
}
The console. The log (getAvg (arr));

CodePudding user response:
lengthCodePudding user response:
The console should be an error, don't look at the error messageCodePudding user response:
Var len=array. Lenght; Pay attention to spelling: lengthCodePudding user response:
Write the wrong lengthCodePudding user response:
Just inside the double post just to see you Chou Chou array sum problem