Home > Net >  my code is not working of javascript but console.log is working so wht can i do help me pls
my code is not working of javascript but console.log is working so wht can i do help me pls

Time:11-25

i am making a digital clock but my javascript code is not working but console.log is working i have checked my code i can't find any error java script : enter image description here and the java script is working bec u can see in the website console.log is working website enter image description here and i have use css and html to make it nice this is html code : enter image description here

and i am beginner in java script

to fix my code why it is not working

CodePudding user response:

you should call the function displayTime().

CodePudding user response:

The Universal rule for all programming languages (unless otherwise) is when you implement a function, you must call it. console.log() is outside the function so it has to work fine.

So you should call displayTime()

  • Related