Stopwatch | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Stopwatch

why is it giving me a syntax error https://code.sololearn.com/W3YJTU3dX7Wp/?ref=app

2nd Aug 2022, 9:57 PM
Junior
Junior - avatar
4 Answers
+ 5
No, it's because you wrote innerhtml = x++. that would set the value to x (which is currently 0) then increments it and that has no effect since there's already a 0 there. on next update it's showing as 1 while real value is 2.
3rd Aug 2022, 2:31 AM
Tina
Tina - avatar
+ 4
Syntax error at line 14, just look at it, it's obvious. forgot a ";" after setTimeout(smallNumsf,1)
2nd Aug 2022, 11:12 PM
Tina
Tina - avatar
0
Okay so why does my second go to 1 after my centi second goes to 10 twice? is it just being innacurate or slow?
2nd Aug 2022, 11:28 PM
Junior
Junior - avatar
0
okay and laatly. why is it so damn slow
3rd Aug 2022, 2:44 AM
Junior
Junior - avatar