JRS: In article <bm*********@drn.newsguy.com>, seen in
news:comp.lang.javascript, Lee <RE**************@cox.net> posted at Fri,
10 Oct 2003 08:23:59 :-
Lasse Reichstein Nielsen said:"(-: Dan :-)" <nn*****@tiscalinet.it> writes:
4. F1(1, ,3)
Can I call 4th way?
Try
F1(1,undefined,3)
It would seem to be cleaner to supply the default value
as found in the documentation for that function:
F1(1,-1,3);
Since F1 may be variable, perhaps supplied as a function parameter, the
actual value used for an undefined parameter may vary. Moreover, I have
a case where undefined actually means leaving out a bit of processing.
Zero would have the same effect, but waste time.
If an undefined value is needed, then define one. I believe that var U
does this in a satisfactory manner, though a longer name might be
preferred.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> JS maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/JS/&c., FAQ topics, links.