Undefined detecting? 2004-03-14 - By Martin Fleck
Back
hello group,
the following situation is giving:
a = []; a[0] = undefined;
a.length returns 1, so there is one element inside the array.
if (a[0]) { returns undefined, it means no record is in it, but this is wrong (a bit).
Is there another solution to detect which index the record belongs too, without using a for in loop?
-- Martin Fleck
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Supported by Fig Leaf Software =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Be sure to check the archives and the wiki: http://chattyfig.figleaf.com/ =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:106911 =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- To unsubscribe send a blank e-mail to: Normal Mode: flashcoders-unsubscribe@(protected) Digest Mode: flashcoders-digest-unsubscrive@(protected)
|
|