S
SM
Hello,
Such a simple question and i can't find the answer(see code below).
Here it is:
I have a function: ini()
In that function, i call a function (load_CDThumbnail) that creates an
array and returns the newly created array
Then, another function is called (show) that needs to pass the newly
created array as a parameter. That's the part that i don't know how to
program
How to pass an array as a parameter?
Thanks
Marco
function ini()
{
var thumbnail = load_CDThumbnail();
show(thumbnail); ??????
}
function load_CDThumbnail()
{
var cdThumbnail = new Array();
...
return cdThumbnail;
}
function show(???thumbnail???)
{
...
for(var i=0; i<thumbnail.length; i++)
{
alert("testing" + i);
}
...
}
Such a simple question and i can't find the answer(see code below).
Here it is:
I have a function: ini()
In that function, i call a function (load_CDThumbnail) that creates an
array and returns the newly created array
Then, another function is called (show) that needs to pass the newly
created array as a parameter. That's the part that i don't know how to
program
How to pass an array as a parameter?
Thanks
Marco
function ini()
{
var thumbnail = load_CDThumbnail();
show(thumbnail); ??????
}
function load_CDThumbnail()
{
var cdThumbnail = new Array();
...
return cdThumbnail;
}
function show(???thumbnail???)
{
...
for(var i=0; i<thumbnail.length; i++)
{
alert("testing" + i);
}
...
}