+ 1
Hello Solos, Can someone tell me what is wrong with my code because its not printing anything😢
Its my Javascript first code, I wrote it from scratch with the help of few tutorios from the internet but I don't understand why its not printing out anything😭😭 https://code.sololearn.com/WOLHw7voZFP6/?ref=app
3 odpowiedzi
+ 2
1. setTimeOut waits and calls the function, but it's not repeated. You should use setInterval
2. You don't set the time, only the date
3. I made some other changes, check it from https://code.sololearn.com/W1qc5Vf9qaqY
+ 1
To begin with getElemetsByClassName stores the elements in an array. so you should write date[0] to refer to the first element that is found. Also you have written two functions but you never call them.
+ 1
@Giannis thank you so much I forgot about function calling
@ Andres04_ve thanks buddy for the extra info
;-)