title: less than 10 add 0 to number
body: <p>How can I modify this code to add a 0 before any digits lower than 10</p>
  
  <pre><code>$('#detect').html( toGeo(apX, screenX)  + latT +', '+ toGeo(apY, screenY) + lonT  );
  
  function toGeo(d, max) {
     var c = '';
  
     var r = d/max * 180;
     var deg = Math.floor(r);
     c += deg + "° ";
  
     r = (r - deg) * 60;
     var min = Math.floor(r);
     c += min + "′ ";
  
     r = (r - min) * 60;
     var sec = Math.floor(r);
     c += sec + "″";
  
     return c;
  }
  </code></pre>
  
  <p>So the outpout would change from </p>
  
  <p>4° 7′ 34″W, 168° 1′ 23″N </p>
  
  <p>to</p>
  
  <p>04° 07′ 34″W, 168° 01′ 23″N </p>
  
  <p>Thanks for your time</p>