In article <knkp6o$sov$
1...@dont-email.me>,
Yes, JS does not do any argument prototype checking, and you don't need
to name the parameters in the function definition.
The arguments are placed in an automagically-created object called arguments,
and then the elements are placed in any named parameters there might be.
function foo(a,b) {
// a contains arguments[0]
// b contains arguments[1]
// further arguments are just in arguments[2] onwards.
}
foo(11,22,33,44); // a=arguments[0]=11, b=arguments[1]=22, arguments[2]=33, arguments[3]=44
Since in your example, the generated function doesn't use arguments[],
the 1 passed in is ignored.
> //Tony
// Another Tony :)
--
Tony Mountifield
Work:
to...@softins.co.uk -
http://www.softins.co.uk
Play:
to...@mountifield.org -
http://tony.mountifield.org