?
Solved

An Array of Arrays in Javascript

Posted on 2011-10-06
4
Medium Priority
?
246 Views
Last Modified: 2012-05-12
I would like to build an array of arrays and pass it to the class below.  How do I build an array of arrays using Javascript?

The code would look some like this
var Cars = new Array();
Cars[0]="Hoopdee";
Cars[1]="Honda";

jQuery.slimbox(Cars, 1, {loop: true});

jQuery.slimbox([["left.jpg"], ["middle.jpg"], ["right.jpg"]], 1, {loop: true});
0
Comment
Question by:Ray Turner
  • 2
  • 2
4 Comments
 
LVL 83

Accepted Solution

by:
leakim971 earned 2000 total points
ID: 36925378
var Cars = new Array();
Cars[0]=["Hoopdee"];
Cars[1]=["Honda"];
0
 

Author Comment

by:Ray Turner
ID: 36925809
Okay.  How do you build an array of arrays?
0
 
LVL 83

Expert Comment

by:leakim971
ID: 36925874
var Cars = new Array();
Cars[0]=["Hoopdee"];
Cars[1]=["Honda"];

Cars is an array
Inside Cars you've two array
each of this array conatins a string
0
 

Author Closing Comment

by:Ray Turner
ID: 36925953
Thanks!!!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question