Last active
May 16, 2019 17:49
-
-
Save CombustibleToast/b70fba41e9809c3dad8a7a0646d814d6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<head> | |
<title> | |
UWU Counter | |
</title> | |
<style id='uStyle'> | |
.uwu{ | |
color:white; | |
font:Arial; | |
font-size:5em; | |
text-align:center; | |
top:50%; | |
} | |
</style> | |
</head> | |
<body style="background-color:powder-blue"> | |
<div class='uwu' id='uwu'> | |
<b>uwu</b> | |
</div> | |
<div class'uwu' id='counter'> | |
0 | |
</div> | |
</body> | |
<script> | |
main(); | |
async function main(){ | |
var count = -1;//get number | |
var html = document.getElementbyId("counter"); | |
for(var i;; i++){ | |
//get number | |
printa(count,html); | |
await sleep(500); | |
} | |
function increment(){ | |
count++; | |
} | |
} | |
function printa(count,html){ | |
html.innerHTML = count; | |
console.log("COUNTER UPDATED TO " + count); | |
} | |
function sleep(ms){ | |
return new Promise(resolve => setTimeout(resolve,ms)); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment