const scores = [20, 30, 70, 80, 90]
function calculateAverage(scores){
let sum = 0;
for(let score of scores)
sum += score;
return sum / scores.lenght;
}
console.log(calculateAverage(scores))
const scores = [20, 30, 70, 80, 90]
function calculateAverage(scores){
let sum = 0;
for(let score of scores)
sum += score;
return sum / scores.lenght;
}
console.log(calculateAverage(scores))
Hello.
I see a typo here. Should be length.
Fix that and tell us if it works.
Regards.
Hello thanks very much I appreciate. It’s crazy how little oversights like this make the difference.
No problem.
It happened to me too yet I thought I did reread the code several times.