It is often useful to create functions with the variable number of arguments: if the argument is not specified, it automatically gets a default value.
Here is how to do it:
function MyFun(a, b, c)
{
a = (typeof(a) == "undefined") ? false : a;
b = (typeof(b) == "undefined") ? 50 : b...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.