Add zeros for begin the number (java script)

function Add_zeroes(number, length) {
    var my_string = '' + number;
    while (my_string.length < length) {        my_string = '0' + my_string;
    }
    return my_string;

}

Post a Comment

Previous Post Next Post