No they must not match, and since jscript/javascript don't support
overloading, we can deduce from this that it simply matches the name of the
function and not the parameters.
Interestingly, every function has a variable called "arguments" explicitely
defined, which you can use to access any excess parameters:
function test(){
for (var i = 0; i < arguments.length; ++i){
alert(arguments[i]);
}
}
test('a', 'b');
will actually display "a" then "b". I'm not sure what the support for this
is (ie, mozilla, opera, ...)
Karl
"Chuck Thomos" <CT************@hotmail.com> wrote in message
news:uC**************@TK2MSFTNGP12.phx.gbl...
Does the number of arguments defined in the Jscript function should match
the number of arguments while calling the function should match?
I am seeing in my test that it is not required to match.
Thanks,
C Thomos