Groups | Blog | Home
all groups > dotnet jscript > april 2004 >

dotnet jscript : Optional and Default value in function parameter


bruce barker
4/12/2004 9:14:51 AM
function myFunction(bExist)
{
if (bExist == null) bExist = false;
return bExist;
}

var b = myFuction(); // will return false;

-- bruce (sqlwork.com)



[quoted text, click to view]

ruca
4/12/2004 10:39:32 AM
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

AddThis Social Bookmark Button