Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- timeCheck = (val) ->
- if val < 10
- val = "0" + val
- getTime = ->
- date = new Date()
- hour = date.getHours()
- minute = date.getMinutes()
- second = date.getSeconds()
- hour = timeCheck(hour)
- minute = timeCheck(minute)
- second = timeCheck(second)
- document.getElementById("clock").innerHTML = "#{hour}:#{minute}:#{second}"
- setTimeout () -> getTime 500
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement