var i = 0;
while(true) {
i++;
if(i === 42) {
break;
}
}
console.log(i);
Expected output:
42
var i;
for(i = 0; i < 100; i++) {
if(i === 42) {
break;
}
}
console.log(i);
Expected output:
42