0

Timer that will not reset on page refresh

Hi all! Can anyone help me with this code? I am trying to have a timer that will continue counting down even after page refresh. I did that using localstorage but the problem here is the timer is counting down 2 sec less than the actual time that is if I am setting timer for 30 seconds it is starting from 28 seconds. I couldn't figure out 2 sec difference. Why is it so, can anyone explain? https://code.sololearn.com/Wn7FMg0b3zno/#html

10th Nov 2020, 11:45 AM
Leena
1 ответ
+ 3
Possibly look Local storage?
10th Nov 2020, 1:09 PM
D_Stark
D_Stark - avatar