Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Golfing solution in Clear category for Sort Array by Element Frequency by lolucky
var frequencySort=(i,
frq=b=>i.filter(v=>b==v).length)=>
i.sort((a,b)=>frq(b)-frq(a)||i.indexOf(a)-i.indexOf(b));
Sept. 10, 2020
Comments: