javascript bidimensional array working example
By liviu - Posted on May 24th, 2009
Tagged:
It was kind of hard to make a bi dimensional array in javascript; i struggled a bit when i needed to do so; so tgis is what worked for me eventually:
function createLinksArray() {
var links = new Array(4);
for (i=0; i <= 3; i++) {
links[i]=new Array(2)
}
links[0]['videoURL'] = 'aaa.flv';
links[0]['videoName'] = 'aaa';
links[1]['videoURL'] = 'sss.flv';
links[1]['videoName'] = 'sss';
links[2]['videoURL'] = 'ddd.flv';
links[2]['videoName'] = 'ddd';
links[3]['videoURL'] = 'fff.flv';
links[3]['videoName'] = 'fff';
return links;
}
Bookmark/Search this post with:
- liviu's blog
- Login or register to post comments
Delicious
Digg
StumbleUpon
Propeller
Reddit
Magnoliacom
Newsvine
Furl
Facebook
Google
Yahoo
Technorati
Icerocket