JSFiddle - React, Tailwind, and code Playground

by thecodeparadox

HTML

<link rel="stylesheet" href="///ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/themes/base/jquery-ui.css">

JavaScript

var arr = [1214500, 1214499, 1214497, 1214481, 1214432, 1214421, 1214419, 1214418, 1214369, 1214045, 1205691];

function sortA() {
    arr.sort(function(a, b) {
       return a - b;
    });
}

function sortD() {
    arr.sort(function(a, b) {
       return b - a;
    });
}

console.log(sortA);