Infinite While Loop
Example
let num = 1;
while (num < 10) {
console.log("This loop will run forever!");
}let num = 1;
while (num < 10) {
console.log("This loop will run forever!");
num++;
}Use Case: Game Loops
Last updated