[thelist] Newbie DOM question
Christian Heilmann
codepo8 at gmail.com
Wed Aug 16 17:51:37 CDT 2006
> > Christian,
> That did the trick, thanks.
> I'm not familar with the "===" operator. Can you fill me in?
> My source of reference is Jeremy Keith's book, Dom Scripting.
> Aaron
It compares not only the value, but also the type. If for example you
want to make sure a variable is an integer and not a string you can
use ===.
if (bla == '2') is true when bla is 2 and when bla is "2"
if(bla===2) is true when bla is 2 but false when bla is "2"
It is in my book *SCNR* :-)
--
Chris Heilmann
Book: http://www.beginningjavascript.com
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/
More information about the thelist
mailing list