diff --git a/countdown.js b/countdown.js index 3001c8d..6c0acae 100644 --- a/countdown.js +++ b/countdown.js @@ -1,5 +1,23 @@ -function countdown(seconds){ - // ... + +function countdown(seconds) { + + console.log(seconds) + + seconds-- + + if (seconds == 0) { + console.log ("Done"); + return + } else { + setTimeout(function(){ + countdown(seconds) + }, 1000); + } } countdown(5); + + + + + diff --git a/index.html b/index.html index ca28931..01fda70 100644 --- a/index.html +++ b/index.html @@ -1,10 +1,11 @@
+