Share your repls and programming experiences

← Back to all posts
REAL time clock
nbash (7)

Wellcome to Clock were you can see the real time! Thanks to @bigminiboss for helping me with this!

My code:

<!DOCTYPE html><html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title></title> <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body> <p id='time'></p> <script src=""> </script> <script>
		document.getElementById("time").innerHTML = moment().format('MMMM Do YYYY, h:mm:ss a');
		function sleep(ms){return new Promise(resolve => setTimeout(resolve, ms))};
		async function Tutor(text, to_write='write', delay=50, to_erase='erase') {
		document.getElementById(to_write).className = "button";
		if (to_erase != "None"){
			for (let i = 0; i < text.length; i++) {        
					await sleep(delay);
					document.getElementById(to_write).innerHTML += text[i];
		function Linkwrite(){
			Tutor('', to_write="link1", to_erase="None");
			Tutor('', to_write="link2", to_erase="None");
		async function Time() {
			while (true){
				document.getElementById('time').innerHTML = moment().format('MMMM Do YYYY, h:mm:ss a');
				await sleep(100);
	<button onclick="Tutor('Welcome to my new Replit called Clock! Clock is a place were you can see what time it is for real, but it is only the EST time. If you want to do something you can go look at these links:')" class="button" id="erase">Click To Start!</button>
	<a href="" target="_blank" rel="noopener noreferrer" id="write" onclick="Linkwrite()"></a>
	<a href="" target="_blank" rel="noopener noreferrer" id="link1" class="notabutton"></a>
	<a href="" target="_blank" rel="noopener noreferrer" id="link2" class="notabutton"></a>
</body> </html>
ch1ck3n (2340)

if it didnt show the real time it wouldn't be a clock :|

nbash (7)

@ch1ck3n it shows the real time tho!

nbash (7)

Thanks for looking at "Clock" :)