Mega Code Archive

 
Categories / JavaScript Tutorial / Function
 

Function arguments

Syntax function.arguments The arguments property is an array that holds the arguments that are passed to a function. The arguments array can only be accessed while inside the function. <html>     <body>     <script lanuguage="JavaScript">     <!--     function foo(a,b) {        foobar(123);        document.write("Done with function foo" + "<br>");     }     function foobar(x) {        document.write(foobar.arguments.length + "<br>");        document.write(foobar.arguments.caller.b + "<br>");     }     document.write(foo(21,44) + "\n");     -->     </script>     </body>     </html>