So basically I have an array with a lot of numbers. And I wanna sort into it, well sorting actually works but after I sort into it I wanna know in which place the sorted number was. This is my code:
console.log(leaderBoard1.sort((a,b)=>b-a));
Well it retuns all the values like: ['1', '2', '3'] and so on, but what I basically want is to get the position of it. By position mean if we want to get something from an array we do: array[0] right? I wanna get the position between the array[position] something like this.
Thanks