* Pads a number to ensure it has a minimum of two digits. * * @param {number} n the number to be padded. * @return {string} the padded number.
(n)
| 550 | * @return {string} the padded number. |
| 551 | */ |
| 552 | function pad(n) { |
| 553 | if (n >= 10) { |
| 554 | return '' + n |
| 555 | } else { |
| 556 | return '0' + n |
| 557 | } |
| 558 | } |
| 559 | |
| 560 | /** |
| 561 | * Logs all messages to the Console API. |