JSFiddle - React, Tailwind, and code Playground

by waxwing

JavaScript

s='@+.0'
function m(x) {
    y = 0;
    c = document.createElement("canvas");
    document.body.appendChild(c);
    a = c.getContext('2d');
    a.font = '9px courier';
    a.fillText(x, 0, 20);
    d = a.getImageData(0, 0, 30, 30);
    for (i = 0; i < 3600; i++) y += d.data[i];
    return y
}
function p(a, b) {
    return m(a) - m(b)
}
alert(s.split('').sort(p).join(''))