diff --git a/map/last/last-map.js b/map/last/last-map.js index ad1249f..1eba853 100644 --- a/map/last/last-map.js +++ b/map/last/last-map.js @@ -61,8 +61,17 @@ } document.addEventListener("DOMContentLoaded", iconClick); -var log = function(){ - console.log("test"); -}; +function startCountdown() { + var time = 10; + var countdown = document.getElementById('countdown'); -setTimeout(log, 3000); + var timer = setInterval(function() { + countdown.innerHTML = time; + time--; + + if (time < 0) { + clearInterval(timer); + alert("Time's up!"); + } + }, 1000); +}