Code doesnt work | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Code doesnt work

why is it my date code "try it yourself" example doesnt show any output on screen?

2nd Feb 2017, 4:15 AM
Raihanath Bindh Latheef
Raihanath Bindh Latheef - avatar
5 Answers
+ 3
show us the code.. at the moment my answer would be: because unicorns don't like dwarves
2nd Feb 2017, 4:20 AM
jay
jay - avatar
+ 3
me.. nope.. someone will be along shortly to help out I am sure
2nd Feb 2017, 4:30 AM
jay
jay - avatar
+ 1
thanks anyway...it is working now...i have set an alert box and due to the intervel it takes time to show up on my screen..
2nd Feb 2017, 4:34 AM
Raihanath Bindh Latheef
Raihanath Bindh Latheef - avatar
0
function printTime() { var d = new Date(); var hours = d.getHours(); var mins = d.getMinutes(); var secs = d.getSeconds(); document.body.innerHTML = hours+":"+mins+":"+secs; } setInterval(printTime, 1000); this is the code given in the chapter
2nd Feb 2017, 4:22 AM
Raihanath Bindh Latheef
Raihanath Bindh Latheef - avatar
0
ooh can you help me to code it..i am new to this..thanks in advance
2nd Feb 2017, 4:25 AM
Raihanath Bindh Latheef
Raihanath Bindh Latheef - avatar