View Single Post
Old 02-25-2013, 10:18 PM   PM User | #7
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,210
Thanks: 59
Thanked 3,996 Times in 3,965 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
YES! I think I wish that JS disallowed using null with == and !=. I certainly admit to sloppily using them way too often.

I *REALLY* dislike code that does stuff such as
Code:
if ( ! document.getElementsByClassName ) { ... }
because it implies that a method reference is a boolean value. I think you should *HAVE* to write
Code:
if ( document.getElementsByClassName === null ) { ... }
Ah, well.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote