Tell us what’s happening:
Hi there
I need some help please? anyone got any ideas
I think I need a for loop?
Thanks alot
Iskren
Your code so far
// User Editable Region
const scores1 = 92+88+12+77+57+100+67+38+97+89;
console.log(scores1)
const scores2=45+87+98+100+86+94+67+88+94+95;
console.log(scores2)
function getAverage(scores){
return scores1/total1;
}
function getAverage2(scores){
return scores2/total2;
}
const getAverage1 =[92, 88, 12, 77, 57, 100, 67, 38, 97, 89]
const getAverage2 =[45, 87, 98, 100, 86, 94, 67, 88, 94, 95]
let total1 = getAverage1.length
console.log(total1);
let total2 = getAverage2.length;
console.log(total2);
console.log(getAverage([92, 88, 12, 77, 57, 100, 67, 38, 97, 89]));
console.log(getAverage([45, 87, 98, 100, 86, 94, 67, 88, 94, 95]));
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Safari/605.1.15
Challenge Information:
Review JavaScript Fundamentals by Building a Gradebook App - Step 1