Skip to content

Commit

Permalink
Updated the reverse method as inbuilt method taking more time
Browse files Browse the repository at this point in the history
  • Loading branch information
web-dev-akash committed Jan 10, 2024
1 parent 190233a commit 078d7ad
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2085,10 +2085,15 @@ const getDailyReports = async (grade, team) => {
totalScore += Number(reports[i].Quiz_Score);
}

const finalReports = [];
for (let i = reports.length - 1; i >= 0; i--) {
finalReports.push(reports[i]);
}

return {
mode: "successReport",
totalScore: totalScore,
reports: reports.reverse(),
reports: finalReports,
};
};

Expand Down

0 comments on commit 078d7ad

Please sign in to comment.