if i have this nested array
let arr=[['g',10000],['s',500],['b',3],['a',200]]
I want to compare the nums in each arr so that the letter with the highest num is biggest so for example here 'g'should be greater than 's'.
i tried loops and iterations i made 2 loops to check each number in each array and compare it but theyre just not working like when i put
console.log(arr[0][0]>arr[1][0])
the output is false but i want it to be true because the array that has g has the number=10000 which is bigger than the number that the letter 's' is with in the same array. so i need help with this