I'm using Firebug 1.0b and Firefox 2.0, no problem here. Weird.

--John

On 1/2/07, Benjamin Sterling <[EMAIL PROTECTED]> wrote:
>
> John, I am using firebug 0.4.1 and I am getting the same response as felix.
>
> Felix, I think you broke my brain now... Thanks... now I need a nap.
>
> Sorry I could not be of help, I've never been good with arrays/objects.
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of John Resig
> Sent: Tuesday, January 02, 2007 9:10 PM
> To: jQuery Discussion.
> Subject: Re: [jQuery] My brain is broken
>
> I copy-and-pasted your code into firebug and it worked perfectly. Not
> sure what's causing your issue - what version of Firefox and Firebug
> are you running?
>
> --John
>
> On 1/2/07, Felix Geisendörfer <[EMAIL PROTECTED]> wrote:
> >
> >  Not only because I can't find an appropriate subject line, but also
> because
> > I can't find the issue with the following code (it's not jQuery related -
> I
> > beg for mercy):
> >  ----------------------------------
> >  var myThoughts =
> >  {
> >      color:  'Blue'
> >      , name: 'Felix'
> >      , food: 'Lasagna'
> >  }
> >
> >  var myMemory = {};
> >
> >  for (var i in myThoughts)
> >  {
> >      myMemory[i] = function()
> >      {
> >          return this['thought'];
> >      }
> >
> >      myMemory[i]['thought'] = i+': '+myThoughts[i];
> >  }
> >
> >  for (var j in myMemory)
> >  {
> >      console.log('Remember: '+j);
> >      console.log('Result: '+myMemory[j].call(myMemory[j]));
> >  }
> >  ----------------------------------
> >
> >  I would expect this to return the following:
> >  ----------------------------------
> >
> >
> > Remember: color
> > Result: color: Blue
> > Remember: name
> > Result: name: Felix
> > Remember: food
> > Result: food: Lasagna ----------------------------------
> >
> >  But instead I am getting:
> >  ----------------------------------
> >
> >
> > Remember: color
> > Result: food: Lasagna
> > Remember: name
> > Result: food: Lasagna
> > Remember: food
> > Result: food: Lasagna ----------------------------------
> >
> >  Tested this in FF 2.0 with the Firebug extension. I feel like I must have
> > missed something embarrassing stupid, but I really need to know what it is
> ;
> > ).
> >
> >  -- Felix
> >
> > --
> >  --------------------------
> >  http://www.thinkingphp.org
> >  http://www.fg-webdesign.de
> > _______________________________________________
> > jQuery mailing list
> > discuss@jquery.com
> > http://jquery.com/discuss/
> >
> >
> >
>
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>
>
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to