• + 1 comment

    I tested my solution in VSCode and results are correct, but i cannot submit as I get message the results are wrong. Could you check please?

    function gradingStudents( grades ) {

    const rounded = []; const gradesOnly = [...grades]; gradesOnly.shift(); for( let grade of gradesOnly ) if( grade < 38 || grade % 5 === 0 ) rounded.push(grade); else if( Math.floor(grade / 5) * 5 + 5 - grade < 3) rounded.push(Math.floor(grade / 5) * 5 + 5); else rounded.push(grade); return rounded;
    }