<!DOCTYPE html>
<html lang="en-US">
<body>
<p>This for loop will execute infinite number of times, but we break it at 10th iteration.</p>
<p id="point"></p>
<script>
var x = document.getElementById("point");
var txt = "";
var i = 0;
for(;;){
if(i == 10)
break;
txt += i;
i++;
}
x.innerText = txt;
</script> </body>
</html>