I would like to sort the following array by the max value of the index 0, and print the value and the index 1 of the corresponding array in Javascript:
[
[ 600, 'marketing' ],
[ 1500, 'it' ],
[ 4200, 'healthy' ]
[ 2400, 'fitness' ],
[ 3300, 'payment' ],
]
Like for example in this case: [ 4200, 'healthy' ]