Getting the summary
const sorted = ranked.sort((a, b) => {
if (a.score < b.score) {
return 1;
} else if (a.score > b.score) {
return -1;
}
return 0;
});const top5 = sorted.slice(0, 5);
console.log({ top5 });Last updated
const sorted = ranked.sort((a, b) => {
if (a.score < b.score) {
return 1;
} else if (a.score > b.score) {
return -1;
}
return 0;
});const top5 = sorted.slice(0, 5);
console.log({ top5 });Last updated