SNIPPETBANK.NET FOLLOW US ON TWITTER

Get Function Argument Count

This code snippet gets a count of how many arguments were passed to a function.

<script type="text/javascript">

        function Example(){
                alert(Example.arguments.length);
        }
       
        Example(1,2);
        Example(1,2,3,4);

</script>

Videos