I use arguments to allow multiple parameters in a function, like this:
function foo(){
for (var i = 0; i < arguments.length; i++) {
alert(arguments[i]);
}
}
Passing foo(1, 2, 3, 4) = OK
But i need to know if it is possible to use various types of parameters, like foo(1, "b", 3, "d"). I get Value is not what was expected when i try.
Any suggestion?
(1, "b", 3, "d").