Javascripts Array :: How To Create Array in Javascripts

<script>
var i;
var a= new Array(10,20,30,40,50);

    for(i=0;i<a.length;i++)
    {

        document.write(a[i] + "<br> ");
    }

        document.write("<br><br><br>");

          document.write(a[0]+"<br>");
      document.write(a[1]+"<br>");
      document.write(a[2]+"<br>");
      document.write(a[3]+"<br>");
      document.write(a[4]+"<br>");
      a[5]=60;
a[6]=70;

document.write(a[5]+"<br>");
 document.write(a[6]+"<br>");
</script>
Javascripts Array :: How To Create Array in Javascripts Javascripts Array ::  How To Create Array in Javascripts Reviewed by Unknown on 7:33:00 PM Rating: 5

No comments:

Powered by Blogger.