I came across something strange. Here two variables which store two differents results:
const membersSortedByCurrentStageTotalPoints = teamMembers.sort((a, b) => compareRanking(a,b,currentIndex));
const membersSortedByRankingType = teamMembers.sort((a, b) => compare(a, b, "points"))
But when I'm using the variable membersSortedByCurrentStageTotalPoints
I get the results of the variable membersSortedByRankingType
.
Anyone would know why ?