JavaScript
JavaScript for 循环
语句 3 也可以省略(比如当循环内部有相应的代码时)
源代码:
点击运行 »
<script> cars = ["BMW", "Volvo", "Saab", "Ford"]; var i = 0, len = cars.length; for (; i < len;) { document.write(cars[i] + "<br>"); i++; } </script>
运行结果:
点击运行 »