JavaScript
JavaScript for 循环
同时您还可以省略语句 1(比如在循环开始前已经设置了值时)
源代码:
点击运行 »
<script> cars = ["BMW", "Volvo", "Saab", "Ford"]; var i = 2, len = cars.length; for (; i < len; i++) { document.write(cars[i] + "<br>"); } </script>
运行结果:
点击运行 »