JavaScript - Cannot Update Array Object Properties Inside Nested For Loops : <p>I have the following nested loops:</p>

<pre><code>for(var i = 0; i &lt; availabilities.length; i++){
    if(availabilities[i].round === 1){
        //  Return the indices of all objects which share the same event_team_user_id property
        var indices = helperService.findArrayIndices(availabilities, 'event_team_user_id', availabilities[i].event_team_user_id);
        for(var x = 1; x &lt; indices.length; x++){
            availabilities[x].status = availabilities[i].status;
            console.log(availabilities[x]);
        }
    }
}
console.log(availabiities);
</code></pre>

<p>The above should find all array objects associated with a particular round (in this case round 1) and then update all other array objects' status property to match the first round's status if those array objects have the same <em>event_team_user_id</em> property.  </p>

<p><code>console.log(availabilities[x]);</code> nested within the two loops correctly outputs the array object, but <code>console.log(availabiities);</code> returns an array object where the changes made in the for loops to the <em>status</em> property aren't reflected.</p>

<p>Why are the updated properties in the array objects not being saved?</p>
