<script> outer:for(var i=0;i<10;i++) { for(var name in window) { if (i==2) { break outer; } document.write("<div>"+name+"</div>"); if(name=="status") break; } } outer:for(var i=0;i<5;i++) { for(var name in window) { if (i==2) { continue outer; } document.write("<div>"+name+"</div>"); if (name=="status") { break; } } } </script>