简单教程
提交运行
代码编辑器:
<p id="demo"></p> <script> var cars = ["BMW", "Volvo", "Saab", "Ford"]; var text = ""; list: { text += cars[0] + "<br>"; text += cars[1] + "<br>"; text += cars[2] + "<br>"; break list; text += cars[3] + "<br>"; } document.getElementById("demo").innerHTML = text; </script>
运行结果: