Hello everybody. I'm trying to use an optional parameters in a
javascript function and don't succeed.
If I believe in the page at <http://www.mozilla.org/js/language/js20-
2002-
04/core/functions.html#N-Parameter>, it's possible at least in
Javascript 2.0 (don't know for the others versions).
Here is what I do :
<script language="JavaScript"><!--
function Test(a,b=100){alert("a=" & a & ", b=" & b);}
//--></script>
And, too, with <script language="JavaScript2.0">.
And it doesn't work. The javascript console binded with Mozilla indicate
the "=" as being an error, telling it wait a ")" after the formal
parameters
I've tried differents syntax too, without success(example : function
Test(a,b:Integer=100)).
How to proceed ? And, do these optional params specific to javascript
2.0 ?