0
How can I make the program print Work only a specific number of times by and by after specific intervals of time?
https://code.sololearn.com/WQOYjS8799Zi/?ref=app Let us take a variable: time=prompt("Enter number of times:") If we enter 2, it Should print: Work 1 after 1 second Work 2
1 Resposta
+ 9
Use the loop😉😅
https://www.sololearn.com/learn/JavaScript/1140/
<body onload="sayHi()"></body>
<script>
function sayHi() {
for(i=1;i<=10;i++){
document.write("Work! <br>");
}
}
</script>