Total members 11892 |It is currently Sat Oct 12, 2024 12:43 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





Multi-dimensional array
Code:

<html>
<
title>Multi-dimensional array  javascript example</title>
<
head>
<
script language="JavaScript" type="text/JavaScript">
var sportStars = new Array (
 ["Red", "20 cars", "45 motorcycle"],
 ["Blue", "30 cars", "3 motorcycle"],
 ["Black", "4 cars", "3 motorcycle"],
 ["White", "3 cars", "2 motorcycle"]
)
</script>

</head>

<body>
 
<script language="JavaScript" type="text/JavaScript">

document.write("<table><tr><th width=\"150\">Color<th width=\"150\">Available Cars<th width=\"150\">Available motorcycle</tr>");
 
  for (a=0;a<=3;a++){
        document.write("<tr><td align='center'>" + sportStars[a][0] + "</td><td align='center'>" + sportStars[a][1] + "</td><td align='center'>" + sportStars[a][2] + "</td></tr>");
}
document.write("</table>");
</script>


</body>
</HTML>




_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : Javascript Multi-dimensional Arrays
 Java Two Dimensional Array     -  
 use one dimensional array to solve sales commissions     -  
 clarification of high dimensional databases using query     -  
 Use two dimensional array to build company sales program     -  
 Multi Thread Program     -  
 Multi colored table rows     -  
 Toggle the Multi Monitor Setting in Windows XP     -  
 multi-frameset and non-re-sizable html frame pages     -  
 $2500 per month working with Multi-million dollar companies     -  
 Arrays in java     -  



Topic Tags

JavaScript Arrays






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com