Find number of parameters passed in function - Javascript Function

Javascript examples for Function:Function Argument

Description

Find number of parameters passed in function

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <title>SO - 17079735</title> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
    window.onload=function(){//from w w  w.jav a2  s  .  c o m
function Customer(Name, Age, Location) {
    var len = arguments.length
    console.log(len)
}
Customer(1,2,3)
Customer(1,2)
    }

      </script> 
   </head> 
   <body>  
   </body>
</html>

Related Tutorials