This is because evaluation of the "fn.foo = 1" expression returns "1"
and any returned value from an expression executed in the command line
is displayed as the result.
This modified example would show nothing in the console again.
var fn = {};
var a = fn.foo = 1;
Honza
On Mar 3, 3:47 pm, Yansky <[email protected]> wrote:
> Sorry for the vague thread title, but I wasn't sure what else to name
> it.
>
> My question;
> if I have the following code:
>
> var fn=1;
>
> nothing shows up in the console (which is what I would expect).
> However, running the following code:
>
> var fn = {};
> fn.foo = 1;
>
> produces "1" in the console.
>
> I was just wondering if that was supposed to happen? It seems kind of
> odd to me. Why show the value being assigned to the objects property
> in the console?
--
You received this message because you are subscribed to the Google Groups
"Firebug" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/firebug?hl=en.