Passing Array to Function

I would like to pass an array to a function but how does the program know which array I would like to choose from??
Lets say I have 3 arrays and I would like to pass array C, to my function.
I checked the web but they only show if you have ONLY 1 array but NOT for multiple arrays.
How would I even go about doing this??

var arrA=new Array("fox.com","nbc.com","abc.com", "google.com");
var arrB=new Array("car","bike","boat", "plane");
var arrC=new Array("1","2","3", "4", "5", "6", "7", "8", "9");

function display(myArray){
   myArray[1] = "changed";
}

display(myArray);

document.writeln(myArray[1]);

thanks

When you call the function, you pass the array you want in the parameter:

var arrA=new Array("fox.com","nbc.com","abc.com", "google.com");
var arrB=new Array("car","bike","boat", "plane");
var arrC=new Array("1","2","3", "4", "5", "6", "7", "8", "9");

function display(myArray){
   myArray[1] = "changed";
}

display([B][COLOR="#FF0000"]arrB[/COLOR][/B]);

document.writeln([B][COLOR="#FF0000"]arrB[/COLOR][/B][1]);

I’m unsure that I understand the question well. If you want to pass a few arrays into the function, then just separate their names by comma.


[COLOR="#0000CD"]function[/COLOR] [B]display[/B]([I]arr1[/I], [I]arr2[/I], [I]arr3[/I]) {
  [COLOR="#A9A9A9"]// ...[/COLOR]
}

[B]display[/B]([I]arrA[/I], [I]arrB[/I], [I]arrC[/I]);