0

my javascript code has an error and I don't know how to solve it,and the error is on line 3

function date() { var actual date = new Date(); var hours = actual date.getHours(); var minutes = actual date.getMinutes(); var seconds = actual date.getSeconds(); document.body.innerhtml = hours+":"+minutes+":"+seconds; } setInterval(date, 1000);

17th May 2022, 9:17 PM
Orbitalbear 2262
1 ответ
+ 6
Hi. Your var has name with 2 words. Write actualDate and try to use it.
17th May 2022, 9:32 PM
Nelli
Nelli - avatar