All Tracks/review js fundamentals by building a gradebook app/
Đang tải...
Hướng dẫn thử thách
1 / 4

Step 1

A teacher has finished grading their students' tests and needs your help to calculate the average score for the class. Complete the `getAverage` function which takes in an array of test scores and returns the average score. The average is calculated by adding up all the scores and dividing by the total number of scores. ```md average = sum of all scores / total number of scores ``` A couple of function calls have been provided for you so you can test out your code. **Tips** - You can use a loop to iterate over the `scores` array and add up all the scores. - You can use the `length` property to get the total number of scores.
Vượt qua bài kiểm tra hiện tại để mở khóa bài tiếp theo.
main.js
UTF-8 • Tab Size: 2Kiểm tra bài:⌘↵
Test Output
Thử thách này không có bài test tự động. Hãy quan sát kết quả trực tiếp ở khung Preview.