You are viewing a single comment's thread. Return to all comments →
I did the same, and was making the same decision between Math.ceil(g/5)5 and g+(5-(g%5)) I ended up with the following:
const gradingStudents = grades => grades.map(grade=> grade <= 37 || grade % 5 < 3 ? grade : grade + (5 - grade % 5));
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 →
I did the same, and was making the same decision between Math.ceil(g/5)5 and g+(5-(g%5)) I ended up with the following:
const gradingStudents = grades => grades.map(grade=> grade <= 37 || grade % 5 < 3 ? grade : grade + (5 - grade % 5));