[thelist] Javascript -- pass all parameters?

Stephen Rider evolt_org at striderweb.com
Thu Oct 26 15:11:05 CDT 2006

On Oct 26, 2006, at 2:24 PM, Matt Warden wrote:

> On 10/26/06, Stephen Rider <evolt_org at striderweb.com> wrote:
>> Within this function I create a new function, and I want to be  
>> able to pass whatever parameters were handed to the master script  
>> into the subsidiary script.
>> function hello($a, $b, [$c, $d... this changes]) {
>>         blah;
>>         x = new function( whatever parameters were passed to 'hello 
>> ()' )
>> { ...blah... };
>> }
> There sure is. The apply function - one of the best features of modern
> JavaScript:
> http://www.webreference.com/js/column26/apply.html

On Oct 26, 2006, at 2:24 PM, Ben Glassman wrote:
> You can access all of the arguments passed to a function using the
> .arguments property of that function.

I love having options!  Thanks much guys.  It's irritating trying to  
find something like this when all you can really think to search  
Google for is "javascript pass parameters".  One of these will do  
quite nicely.


More information about the thelist mailing list