Javascript examples for Function:Function Argument
Variable number of object parameters to function
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=( function() {/*from ww w .ja va2 s . c o m*/ function objArgs() { for(var i = 0; i < arguments.length; i++){ console.log(arguments[i]); } } objArgs({one: 1}, {two: 2}, {three: 3}); }); </script> </head> <body> </body> </html>