diff --git a/digital-clock/index.html b/digital-clock/index.html index ff9c4b1..752ca9c 100644 --- a/digital-clock/index.html +++ b/digital-clock/index.html @@ -1,14 +1,41 @@ + Javascript Digital Clock - + + + +
- jjj +

- + + + + \ No newline at end of file diff --git a/digital-clock/script.js b/digital-clock/script.js deleted file mode 100644 index ec1c6aa..0000000 --- a/digital-clock/script.js +++ /dev/null @@ -1,19 +0,0 @@ -(function() { - function addZeroBefore(v) { - return +v < 10 ? "0" + +v : v; - } - - function showTime() { - - var today = new Date(); - var textTime = addZeroBefore(today.getHours()) + " : " + addZeroBefore(today.getMinutes()) + " : " + addZeroBefore(today.getSeconds()); - - document.getElementById("time").innerHTML = textTime; - - setTimeout(function() { - showTime() - }, 1000); - } - - showTime(); -})(); \ No newline at end of file