You are viewing a single comment's thread. Return to all comments →
My JS solution:
function gradingStudents(grades) { let finalMarks = []; grades.forEach(grade => { grade < 38 || grade % 5 < 3 ? finalMarks.push(grade) : finalMarks.push(Math.ceil(grade/5)*5) }) return finalMarks; }
Seems like cookies are disabled on this browser, please enable them to open this website
Grading Students
You are viewing a single comment's thread. Return to all comments →
My JS solution: