Watches
// source https://jsbin.com/lohodet
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Watches</title>
</head>
<body>
<span id = "hours"></span>
<script id="jsbin-javascript">
function watchesBuilder(){
var hours = document.getElementById("hours");
return function(){
var date = new Date();
hours.innerText = date.getHours() +
" " + date.getMinutes() +
" " + date.getSeconds();
}
}
var watches = watchesBuilder();
setInterval(function(){
watches();
}, 1000);
</script>
<script id="jsbin-source-javascript" type="text/javascript">function watchesBuilder(){
var hours = document.getElementById("hours");
return function(){
var date = new Date();
hours.innerText = date.getHours() +
" " + date.getMinutes() +
" " + date.getSeconds();
}
}
var watches = watchesBuilder();
setInterval(function(){
watches();
}, 1000);
</script></body>
</html>
function watchesBuilder(){
var hours = document.getElementById("hours");
return function(){
var date = new Date();
hours.innerText = date.getHours() +
" " + date.getMinutes() +
" " + date.getSeconds();
}
}
var watches = watchesBuilder();
setInterval(function(){
watches();
}, 1000);