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 @@ + Countdown exercise - See console. +
text 1
diff --git a/kitchentimer.html b/kitchentimer.html new file mode 100644 index 0000000..5c660f6 --- /dev/null +++ b/kitchentimer.html @@ -0,0 +1,180 @@ + + + + kitchen timer + + + + + + + + +
+
+ +
+
start
+
reset
+
+ + + + + + + + + + + + + + + + + + + + + +