Javascript examples for Function:Function Argument
The arguments.length property returns the number of arguments received when the function was invoked:
<!DOCTYPE html> <html> <body> <p id="demo"></p> <script> function myFunction(a, b) { return arguments.length;//from ww w .j a v a 2 s . c o m } document.getElementById("demo").innerHTML = myFunction(4, 3); </script> </body> </html>