Question: I need your help.

I'd like to create a function that would add some zeros in front of a number. The maximum numbers of digits that the total string should have is 6. Here are examples:

```
     9 -> 000009
    14 -> 000014
   230 -> 000230
  1459 -> 001459
 21055 -> 021055
987632 -> 987632 (Do nothing, there's already 6 digits)

```

Answer: 
Recursive solution just for the heck of it:

```
function padNumberString(numberString) {
    if (numberString.length >= 6) {
        return numberString;
    }
    return padNumberString('0' + numberString);
}

```
A simple solution would be

```
    function addLeadingZeros (n, length)
    {
     var str = (n > 0 ? n : -n) + "";
     var zeros = "";
      for (var i = length - str.length; i > 0; i--)
         zeros += "0";
     zeros += str;
    return n >= 0 ? zeros : "-" + zeros;
    }

//addLeadingZeros (9, 3) =   "009"
//addLeadingZeros (15, 3) =  "015"
//addLeadingZeros (333, 3) = "333"

```