Getting the function arguments in javascript like in PHP
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/676721/calling-dynamic-function-with-dynamic-parameters-in-javascript">Calling dynamic function with dynamic parameters in Javascript</a><br>
  <a href="http://stackoverflow.com/questions/3917243/javascript-array-parameter-list">javascript array parameter list</a>  </p>
</blockquote>



<p>I'm looking for the Javascript equivalent of the following functionality I use in PHP:</p>

<pre><code>function myfunc()
{
     $arg_arr = array();
     $arg_arr = func_get_args();

     $my_arg_val_1 = (!isset($arg_arr[1]) || ($arg_arr[1] == '')) ? true : $arg_arr[1];
}
</code></pre>

<p>Basically, I'm trying to get the function arguments. I want to write a javascript function to take one argument, but I want to add some code to do a few things with the second and third argument if it is provided, but I'm not sure how to pull this off.</p>

<p>Any assistance will be appreciated.</p>

<p>Thanks.</p>
