function padNumber(num, len, padChar){
    if(len === undefined || len == null || len < 1) { len = 2; }
    if(padChar === undefined || padChar == null || padChar == '') { padChar = '0'; }
    while(num.toString().length < len){
        num = padChar + num;
    }
    return num;
}
/*
**    Description:    Takes initial string and pads the left side of the string with a specified character until it reaches the desired length
**    Arguments:        num (string) - initial string to be adjusted to desired length
**                    len (numeric) [optional] - the desired length of the string at which point the function ends, defaults to 2
**                    padChar (character) [optional] - the character to prepend to num (see above), defaults to '0'
*/
Takes initial string and pads the left side of the string with a specified character until it reaches the desired length
Arguments:        num (string) - initial string to be adjusted to desired length
len (numeric) [optional] - the desired length of the string at which point the function ends, defaults to 2
padChar (character) [optional] - the character to prepend to num , defaults to '0'
Takes initial string and pads the left side of the string with a specified character until it reaches the desired length Arguments : num ( string ) - initial string to be adjusted to desired length len ( numeric ) [ optional ] - the desired length of the string at which point the function ends defaults to 2 padChar ( character ) [ optional ] - the character to prepend to num defaults to ' 0 '
function padNumber(num, len, padChar){
    if(len === undefined || len == null || len < 1) { len = 2; }
    if(padChar === undefined || padChar == null || padChar == '') { padChar = '0'; }
    while(num.toString().length < len){
        num = padChar + num;
    }
    return num;
}
function padNumber ( num , len , padChar ) { if ( len === undefined || len == null || len < 1 ) { len = 2 ; } if ( padChar === undefined || padChar == null || padChar == '' ) { padChar = '0' ; } while ( num . toString ( ) . length < len ) { num = padChar + num ; } return num ; }
Description:    Takes initial string and pads the left side of the string with a specified character until it reaches the desired length
Arguments:        num (string) - initial string to be adjusted to desired length
len (numeric) [optional] - the desired length of the string at which point the function ends, defaults to 2
padChar (character) [optional] - the character to prepend to num (see above), defaults to '0'
Description : Takes initial string and pads the left side of the string with a specified character until it reaches the desired length Arguments : num ( string ) - initial string to be adjusted to desired length len ( numeric ) [ optional ] - the desired length of the string at which point the function ends defaults to 2 padChar ( character ) [ optional ] - the character to prepend to num ( see above ) defaults to ' 0 '