Unexpected character in CountdownJS

0

I'm using a countdown on my page. After a few searches I found CountdownJS . I followed this tutorial until I realized that even without changing anything in the script code I downloaded from Official Site it displays an error in the console:

Istherereallyawrongcharacterinthecodeorisitsomeconfigurationthatneedstobedoneintheenvironment?

HTML:

<!doctypehtml><htmllang="en">
<head>
    <meta charset="UTF-8">
    <title>Countdown</title>
</head>
<body>
    Countdown until 2050  
    <h1 id="countdown-holder"></h1> 

    <script src="countdown.js"></script>
    <script>  
      var clock = document.getElementById("countdown-holder")  
        , targetDate = new Date(2050, 00, 01); // Jan 1, 2050;  

      clock.innerHTML = countdown(targetDate).toString();  
      setInterval(function(){  
        clock.innerHTML = countdown(targetDate).toString();  
      }, 1000);  
    </script> 
</body>
</html>

SCRIPT: link

    
asked by anonymous 21.05.2014 / 15:55

1 answer

0

Here you used comma and the correct one would be semicolon

  var clock = document.getElementById("countdown-holder")  // nessa linha
    , targetDate = new Date(2050, 00, 01); // Jan 1, 2050;  // nessa linha

The correct one would be

 var clock = document.getElementById("countdown-holder");  
 targetDate = new Date(2050, 00, 01); // Jan 1, 2050;  
    
21.05.2014 / 16:58