Help | SoloLearn: Learn to code for FREE!

+3

Help

Why my clock doesn't display? https://code.sololearn.com/WrUo324Xh6b5/?ref=app

3/3/2021 9:03:44 AM

ηιℓα

2 Answers

New Answer

+1

From line 43 through 45 replace 'new' with 'now'. 'now' is a variable defined at line 11. Basically you mistyped the variable identifier. If you find yourself unable to figure out what's is wrong with your code try to take a break and come back to it later.

+1

/* var sec=new.getSeconds(); var min=new.getMinutes(); var hr=new.getHours(); */ var datenow = new Date(); var sec=datenow.getSeconds(); var min=datenow.getMinutes(); var hr=datenow.getHours();