here is my javascript code:
var my_array = new Array();
my_array[0] = "a";
my_array[0] = "b";
my_array[0] = "c";
print_array(my_array);
function print_array(arr)
{
alert(arr);
}
But it doesn't work, because I can't pass the array to the function. So, how can I pass an entire array to javascript function?
EDIT:
Nevermind. I found the solution.
Hidden cause this is bad practice and passes the array as a string:
If someone will need to pass an array to the function, first use this: JSON.stringify() and javascript will be able to parse an array.