JS lab 3
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import {students} from "./data.js"
|
||||
let passingStudents = [];
|
||||
|
||||
function getPassingStudents(students, passMark = 70) {
|
||||
if (isNaN(passMark) || passMark < 0) {
|
||||
return false;
|
||||
}
|
||||
passingStudents = students.filter(student => {
|
||||
let grade = parseInt(student.grade);
|
||||
if (isNaN(grade)) return false;
|
||||
|
||||
return true;
|
||||
});
|
||||
return passingStudents;
|
||||
}
|
||||
|
||||
function calculateCourseAverage(students) {
|
||||
|
||||
}
|
||||
|
||||
function getTopPerCourse(students) {
|
||||
|
||||
}
|
||||
|
||||
function calculateOverallStatistics(students) {
|
||||
|
||||
}
|
||||
|
||||
function calculateAssignmentAvgerage(students) {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user