Because "jobs" is a number primitive, not an object. "friends" and
"favoriteThings" on the other hand are objects. They are simply
references (pointers), so when you change their values, you are
actually changing values of objects which they are referencing. If you
made jobs via "new Number()" rather than a number literal, it would
also be an object, and any change in one instance would affect other
ones as well.

- kangax

On Jun 7, 9:45 am, dynamo517 <[EMAIL PROTECTED]> wrote:
> I see what you're saying and I'll just use the initialize method from
> here on out.  I just wonder why if it's an integer (see jobs variable
> in example code), this problem doesn't occur.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" 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/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to