Well, writing void(0) is shorter and harder to misspell...
or you just write undefined instead of void(0) or void 0.
But since undefined is not a reserved word, anyone could write a line like
undefined = 3;
and break your code. This can be fixed, obviously, by something like
var UNDEFINED;
and using UNDEFINED instead of undefined (which should also save some
bytes when compressing with the YUI Compressor or the Closure Compiler).
Matt
--
To view archived discussions from the original JSMentors Mailman list:
http://www.mail-archive.com/[email protected]/
To search via a non-Google archive, visit here:
http://www.mail-archive.com/[email protected]/
To unsubscribe from this group, send email to
[email protected]