[thelist] Re: Javascript empty array question
Peter-Paul Koch
gassinaumasis at hotmail.com
Mon Jan 28 09:49:01 CST 2002
>That would work for a boolean value, but length returns an int value. So,
>
>if (errormessage.length == 0)
> // array is empty
if (!property) returns true if
a) the property is boolean 'false'
b) the property is number 0
c) the property is an empty string ''
So if (!errormessage.length) works fine.
ppk
_________________________________________________________________
Join the worlds largest e-mail service with MSN Hotmail.
http://www.hotmail.com
More information about the thelist
mailing list