+ 1

How to print hello world for infinite times in javascript?

How to print hello world for infinite times in javascript? I tried this . But, it not done.

5th May 2020, 2:17 AM
🐕Pradeep Simba 🐶
🐕Pradeep Simba 🐶 - avatar
5 Respostas
+ 4
The answer of while(true), or for(;;) forever loop are impractical, it only makes the webpage hang with white page. Use setInterval to run the loop. setInterval(()=>document.body.innerText += 'Hello World! ',100) https://code.sololearn.com/W4zC0qUgW6Gy/?ref=app
5th May 2020, 3:32 AM
Calviղ
Calviղ - avatar
+ 3
while (true){ console.log('hello world') } There are many ways to do but this is simple one.
5th May 2020, 2:27 AM
Sudarshan Rai
Sudarshan Rai - avatar
+ 2
for(;;) alert("hello")
5th May 2020, 2:29 AM
Dasarath Singh
0
Hello
18th Oct 2024, 2:59 AM
Prajna Puranik
Prajna Puranik - avatar