Example with 2 completely different code snippets
while (true) { // Noncompliant; constant end condition j++; } var k; var b = true; while (b) { // Noncompliant; constant end condition k++; }
while (true) { // break will potentially allow leaving the loop var x = 3; for(let i=2; i<4; i++) { console.log("Hello there"); } alert('Click here'); thisIsNiceFunction();