JSFiddle - React, Tailwind, and code Playground

HTML

<div id="sample"></div>

JavaScript

var a, b, i;
a = [
    [1, 50],
    [2, 75],
    [3, 25],
    [4, 90],
    [5, 10]
];
b = xsort(a, 1, 1);
for(i = 0; i < b.length; i++) {
    $("#sample").append(b[i][0] + ", " + b[i][1] + "<br>");
}

function xsort(arrs, col, order) {
    //二次元配列のソート
    //col:並べ替えの対象となる列(0列目から)
    //order:1=昇順、-1=降順
    arrs.sort(function (a, b) {
        return(a[col] - b[col]) * order;
    });
    return arrs;
}