Home Java Javascript-array JavaScript array of arrays



JavaScript array of arrays
Posted on: November 10, 2008 at 12:00 AM
In this Tutorial we want to describe you a code that help you in understanding JavaScript array of arrays.

JavaScript array of arrays

     

In this Tutorial we want to describe you a code that help you in understanding JavaScript array of arrays. For this we are using JavaScript as Script language. We instantiate an array object by passing argument and object of array to it and allocate them to the memory. The element in the array can be accessed by its numerical index. Finally the document. write print the list of  element in an array.

 

 

 

 

 

 

javascriptArrayofArray.html

<html>
<head>
<title>JavaScript Array of Arrays</title>
</head>
<body>
<h1>JavaScript Array of Arrays</h1>
<script language="Javascript">
var array = new Array("Rose","India",564,375,new Array(5,6,7),".net")
document.write("array[0] = "+array[0]+"<br>")
document.write("array[1] = "+array[1]+"<br>")
document.write("array[2] = "+array[2]+"<br>")
document.write("array[3] = "+array[3]+"<br>")
document.write("array[4][0] = "+array[4][0]+"<br>")
document.write("array[4][1] = "+array[4][1]+"<br>")
document.write("array[4][2]= "+array[4][2]+"<br>")
document.write("array[5]= "+array[5]+"<br>")
</script>
</body>
</html>

Output of the program

Download source code

Related Tags for JavaScript array of arrays:
javajavascriptcarraysmemoryarraylistantscriptobjectlanguagehelpsedprintiptutorialusingintriathiswriteelementnumericalforindexfinalnumerictoicalfinallysseargumentlanssieitdocdescanliceinpasscalasstamntwancalocatejesemallallocaagememolocmeobjcatdodescribetorsessatisinstantinstantiatehallrayandarcodcodeccunderstandingwantvatutorscrssriripthavstaccessantiallochatfinjeicaicaprndodeo


More Tutorials from this section

Ask Questions?    Discuss: JavaScript array of arrays  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.