We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
my version not the best
I forget to devide by 5 in place of 10
functiongradingStudents(grades){// Write your code herereturngrades.map((grade)=>{if(grade<38){returngrade;}constmodule=grade%10;constdiff=module<=5?(5-module):(10-module);if(diff<3){returngrade+diff;}returngrade;})}
Cookie support is required to access HackerRank
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 version not the best I forget to devide by 5 in place of 10