W3School TIY
编辑您的代码:
<!DOCTYPE html> <html> <body> <script> cars=["BMW","Volvo","Saab","Ford"]; var i=0; while (cars[i]) { document.write(cars[i] + "<br>"); i++; } </script> </body> </html>
查看结果: