Array length headaches
A co-worker of mine stumbled across this little gem:
var foo = ['a', 'b', 'c', 'd',]; document.write(foo.length);
Moz/Firefox will print 4. IE6 will print 5. Why?
Look again at the array. See the extra comma on the right? IE6 interprets this as an additional element with an undefined value. Moz/Firefox ignores it.