On Tue, Jul 5, 2011 at 1:57 AM, Poetro <[email protected]> wrote:
> 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.

Wow, that's pretty bad.

>> Also, you will want to check for the existence of console.log before you
>> call it, otherwise you will get a runtime error if firebug is switched off.
>>
> Maybe he uses IE9, Chrome, Opera or Safari, where it doesnt cause any trouble.

Yeah, but presumably this code will go live one day, in which case
this is a bug waiting to happen.

David

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