fabianmoronzirfas
7/1/2013 - 10:39 PM

Pad numbers in Javascript

Pad numbers in Javascript

function pad(num, size) {
    var s = "00000" + num;
    return s.substr(s.length-size);
}