I want to create an infinite loop in JavaScript.
What are some ways to achieve this:
eg
for (var i=0; i<Infinity; i++) {}
I want to create an infinite loop in JavaScript.
What are some ways to achieve this:
eg
for (var i=0; i<Infinity; i++) {}
 
    
    You can also use a while loop:
while (true) {
    //your code
}
 
    
     
    
    By omitting all parts of the head, the loop can also become infinite:
for (;;) {}
