How can I pass multiple and unlimited arguments
and one or two parameters to a function?
Example:
function myFunction(_id, _class, arg1, arg2, arg3, arg4, etc...){
console.log($(_id).html());
console.log($(_class).html());
for(var i = 0; i < args.length; i++) {
alert(args[i]);
}
}
myFunction("#myDiv",".mySpan", "Hello World!", "Bonjour le monde!", "Hola mundo!", "Ciao mondo", "Hallo Welt!", "etc");