Can anyone knows why my code not show time | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

Can anyone knows why my code not show time

When i was creaing a digital clock the js code was not working ..

11th Feb 2021, 9:30 AM
X_X
X_X - avatar
3 Answers
+ 3
Post your CODE First Please so we can Help you.
11th Feb 2021, 9:38 AM
Ezra Bridger 2207 [INACTIVE]
Ezra Bridger 2207 [INACTIVE] - avatar
+ 2
you maybe need to wrap your js in an onload event handler function: onload = () => { /* your js code */ }; but not function declarations used in html inlined events ^^ (the good way to handle them is to attach them dynamically at start)... the reason is that in sololearn android app, the js tab is inserted in the head section, before dom was ready to be accessed (don't know how it is handle on iOS, appended to body in -- actual last version -- web)
11th Feb 2021, 10:41 AM
visph
visph - avatar
0
Thankyou all
11th Feb 2021, 10:52 AM
X_X
X_X - avatar