Javascript examples for Statement:for
Output objects with for loop
<html> <head> <title>Date Parse</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){//from w w w . j av a 2s. c om var dateText = ["19", "May", "1945", "?", "22", "August", "1945"]; var d = ''; for(var i = 0; i < dateText.length; i++) { d += dateText[i] + ' '; } console.log(d); } </script> </head> <body> </body> </html>