This is a javascript code. I have a collection of 10 functions card11() to card25(). On-click in another HTML code, I want one of these functions to be called randomly. I applied the following logic, but it seems to be flawed. HELP, please!
arr=[card11(), card12(), card13(), card14(), card15(), card21(), card22(), card23() , card24(), card25()];
function myFunc(arr)
{
var d, c, b = arr.length;
while (b)
{
c = Math.floor(Math.random() * b);
d = arr[--b];
arr[b] = arr[c];
arr[c] = d;
}
return arr;
}