Review JavaScript Fundamentals by Building a Gradebook App - Step 1

Tell us what’s happening:

Hi there

can someone please tell me how to start? I am abit lost.

Thanks
Iskren

Your code so far


// User Editable Region

function getAverage(scores) {
  
}

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

you need first to understand the requirements: you need to return the average value of the numbers in the array. Do you know how to calculate an average?

of course I know how to calculate an average, do I need to create a for loop?

you said you were lost without stating what aspect was confusing you. Ilenia had to guess. (You didn’t even state if you understood the problem!)

a for loop could certainly be useful. What would you use it for?