Top.Mail.Ru
? ?
Javascript's Journal
 
[Most Recent Entries] [Calendar View] [Friends View]

Saturday, November 15th, 2008

Time Event
7:26p
javascript: sending the name of an array as a variable
Hello,
I am predefining a series of arrays and I want to send the name of the array as a variable. But the problem is that the variable is not recognized as an array...

ie
[arrayName is equal to "array1"]

function thisfunction(arrayName)
{

var array1 = new array(...);
var array2 = new array(...);

alert(arrayName.length);

}


This does not give me the length of the array.

<< Previous Day 2008/11/15
[Calendar]
Next Day >>
About LiveJournal.com
Image