title: Javascript change getHours to 2 digit
body: <p>If the hour is less than 10 hours the hours are usually placed in single digit form.</p>
  
  <pre><code>var currentHours = currentTime.getHours ( );
  </code></pre>
  
  <p>Is the following the only best way to get the hours to display as <code>09</code> instead of <code>9</code>?</p>
  
  <pre><code>if (currentHours &lt; 10)  currentHours = '0'+currentHours;
  </code></pre>