Don't say much about yourself on the code
This is what I started learning JavaScript, and now it's coming out.
< span ID = "Clock" ></ span >
functionTime () {varToday =NewDate (); varHou; varTime ; varDay ; if(Today.gethours () < && today.gethours () >= 0) {Hou=today.gethours (); time= "AM"; } Else if(Today.gethours () <= && today.gethours () > 12) {Hou= Today.gethours ()-12; time= "PM"; } varD =Today.getday (); if(d = = 0) { Day= "Day"; } Else if(d = = 1) { Day= "One"; } Else if(d = = 2) { Day= "Two"; } Else if(d = = 3) { Day= "three"; } Else if(d = = 4) { Day= "Four"; } Else if(d = = 5) { Day= "Five"; } Else if(d = = 6) { Day= "Six"; } document.getElementById ("Clock"). InnerHTML = (today.getfullyear () + "year" + (Today.getmonth () + 1) + "month" + today.getdate () + "Day " + Hou + " : "+ today.getminutes () +": "+ today.getseconds () +" "+ Time +" Week "+Day ); } varMyTime = SetInterval ("Time ()", 1000);
"Sixth" JavaScript displays the current time (month, day, and minute of the week)