Build a very simple kitchen timer: modify the countdown()
function in countdown.js to take a number of seconds, then print each second counting down to zero.
countdown(3);
// should print
// 3...
// 2...
// 1...
// 0
- Use global variable to keep track of time
- Keep track of time without defining any global variables
- BONUS: don't define any new variables