>> 2011/7/5 David Marrs <[email protected]>:
>> > Why do you have a 2nd arg in your lambda called undefined?
>> Because he might want to use the undefined value, and in case someone
>> in the global scope created a variable named undefined, then it can
>> cause trouble.
>
> If in doubt, use "void 0" instead. That always evaluates to undefined.
> /L

I think I prefer this option.  I can see someone accidentally
redefining the closure's undefined by passing in an arg by mistake.
That could be a difficult bug to spot as well.

-- 
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]

Reply via email to