Returns a string padded with leading zeros
npm install padzeros#Pad Zeros
The following function returns a string containing the formatted representation of a number padded with leading zeros.
javascript
var result;
result = padzeros(42,4); // returns "0042"
result = padzeros(42,2); // returns "42"
result = padzeros(5,4); // returns "0005"
`
$3
`sh
$ npm install padzeros
``