JSFiddle - React, Tailwind, and code Playground

by srakesh

JavaScript

function sortmyway(data_A, data_B)
{
    return (data_A - data_B);
}
var list =[ 39, 108, 21, 55, 18, 9]
list.sort(sortmyway) 
alert(list);