title: javascript date returns undefined
body: <p>im making it display the time in javascript but when it returns the time it is always undefined. below is the code</p>
  
  <p>im not really sure why it always returns undefined though. </p>
  
  <pre><code>$('#bar #time').html(hours + ":" + minutes + " " + suffix);
  
  
  var currentTime = new Date()
  var hours = currentTime.getHours()
  var minutes = currentTime.getMinutes()
  
  //decides if am or pm
  var suffix = "AM";
  if (hours &gt;= 12) {
      suffix = "PM";
      hours = hours - 12;
  }
  if (hours == 0) {
      hours = 12;
  }
  
  // shows 0 before the minutes if under 10
  if (minutes &lt; 10)
  minutes = "0" + minutes
  </code></pre>