javascript doesn't require that all the parameters defined are passed in. It
is not compiled, and the interpreter doesn't care. So if there are 5
parameters defined, the caller can pass in 0, 1, 2, 3, 4 or 5 arguments in.
So in essence, they are all optional as far as the interpreter is concerned.
As far as default values, you would have to check if a particular argument
is null, and if it, manually assign it a value in your function to have the
effect of having a default value.
"ruca" <ru***@iol.pt> wrote in message
news:O3**************@TK2MSFTNGP12.phx.gbl...
Hi,
How can I set a parameter of a function optinal and have a default value?
In VB I do like this:
Function myFunction (Optional ByVal bExist as Boolean = False)
What's the equivalent in JScript?
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca