I created a clock to be placed in the header of my website. The time is not displaying a zero for minutes < 10. For example if the time is 10:50, it will only show 10:5 ,
Since you're likely to run into presentational issues in the future along the same lines, I'd recommend picking a favorite string formatting function for Javascript.
Some examples:
Then you can do something like "{0:00}:{1:00}".format(current.getHours(), current.getMinutes())
or even better,
var d = new Date();
var s = d.format("hh:mm:ss tt");
// Result: "02:28:06 PM"