Well, you can help me ... I'm learning to make a clock with JavaScript ...
But if to concatenate 0 in front of seconds, minutes and hours is not working ... I can not find the error ...
var tempo=new Date();
var hora=tempo.getHours();
var min=tempo.getMinutes();
var seg=tempo.getSeconds();
var impressao=hora + ":" + min + ":" + seg;
if(hora<10){
hora="0" + tempo.getHours;
}
if(min<10){
min="0" + tempo.getMinutes;
}
if (seg<10){
seg="0" + tempo.getSeconds;
}
document.write(impressao);