Answer to Question #298222 in HTML/JavaScript Web Application for Maitri

Question #298222

Create a function that will take the array as an argument and return the average of the quizzes.

1
Expert's answer
2022-02-15T13:57:38-0500
function averageValue(arr) {
    let sum = 0
    arr.map((num) => sum += num)
    return sum / arr.length
}

const numbers = [2, 5, 8, 3, 4, 10, 7]

console.log(averageValue(numbers))

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS