Javascript Reference Guide

 
 
This guide contains useful Javascript tips.







Array.



Information
none

Code
    <script type="text/javascript" language="JavaScript" >
    //var days = new Array("Sunday", "Monday", "Tuesday");
    var days = new Array(3);
    days[0] = "Sunday";
    days[1] = "Monday";
    days[2] = "Tuesday";

    document.write('<table border="1">');
    for (var i=0; i<days.length; i++) {
        document.write('<tr><td>' + days[i] + '</td>');
    }
    document.write('</table>');
    </script>       
	
Result