Language: JavaScript
Answer:
let num = [10,20,30];
average(num);
function average(num) {
let sum = 0;
for(let i in num) {
sum += num[i];
}
return console.log(sum/num.length);
3.6m questions
4.7m answers