Yes, that's correct. The typeof operator does not require its operand to be
defined. When its operand is not defined, typeof returns the string
'undefined'. All correct, expected behavior.

On Fri, Feb 4, 2011 at 7:54 PM, mcot <[email protected]> wrote:

> Hi.  I am still reading up on this but here are some more tests I have
> run:
>
> console.log(typeof(foo) === 'undefined');       // true  -- doesn't raise
> reference error.
> foo;                                                            //
> reference error even without the call to console.log
>
> --
> 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]<jsmentors%[email protected]>
>

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