[Javascript] Unexpected Result

liorean liorean at gmail.com
Wed Aug 4 02:51:26 CDT 2010


On 3 August 2010 23:18, Terry Riegel <riegel at clearimageonline.com> wrote:
>> If you want to do the equivalent of passing around
>> references, then you need to pass around a reference type from which
>> you read a property, and store new values in a property of that
>> object.
>
> This is where you lost me. How would that look in my example?

Reference type means object, array, function mostly. Things that
aren't value types/primitives.

    QQ = $.a.LASTLOSER; // => 5

    QQ[2] = 2; // => 2

    QQ[2]; // => 2

    $.a.LASTLOSER[2] // => 2

-- 
David "liorean" Andersson


More information about the Javascript mailing list