+ 1
Why it doesn't update every second?
2 Answers
+ 7
https://code.sololearn.com/W2VEOoU0Lg51/?ref=app
here i removed the () in ok function in the update
+ 6
As @Abdur stated you're calling the ok function in your setinterval function instead of passing the function to the function. So change line 21 from:
var x = setInterval(ok(), 1000);
to:
var x = setInterval(ok, 1000);