title: Decimal Degrees to Degrees Minutes And Seconds in Javascript
body: <p>Im trying to write a function that takes my decimal degrees (lat or long) and converts them to DMS degrees minutes seconds. I know I am meant to times the decimal point number by 60 then it's decimal again. But am a noob. Would I split the number?</p>
  
  <pre><code>function ConvertDDToDMS(DD) {
      eg. DD =-42.4
      D= 42;
      M= 4*60;
      S= .M * 60;
      var DMS =
  
      return DMS //append Direction (N, S, E, W);
  }
  </code></pre>
  
  <p>Am I on the right track?</p>