0

I want to "print" / "echo" text in javascript while pausing the script between. Currently my script works but it prints all at the same time .

Sorry I am not familiar with Javascript

<script>
function wait(ms)
{
    var d = new Date();
    var d2 = null;
    do { d2 = new Date(); }
    while(d2-d < ms);
}
wait(1000);
document.write('hello');
wait(1000);
document.write(' how are you?');
</script>
bondikho
  • 1
  • 4

0 Answers0