infinite for loops in javascript code example
Example 1: javascript infinite loop
while (true) {
//your code
}
Example 2: forever loop in js
while(2 == 2) {
//your code here
}
Example 3: javascript forever loop
x = 2;
while (x == x) {
//please add your code here
}
Example 4: javascript infinite for loop
var userInput;
var more;
userInput=prompt("Select number from 0 to 9","")
userInput=parseInt(userInput);
for (index=userInput;index < 0;index>9 ) {
document.write("Not in range");
}
document.write("Not in range");