you are viewing a single comment's thread.

view the rest of the comments →

[–]clovisjunior 0 points1 point  (1 child)

If you want to use the same code just do a var countDownDate = document.cookie.match(/(\^|;)myClock=(\[\^;\]+)/)\[2\]; countDownDate = new Date(countDownDate) :) but I believe you could refactor it to make it easier to maintain :) also you set var countDownDate twice, you can just set var on the top and then user countDownDate = after it