# Making sure an array reference to a property stays up-to-date?

**URL:** <https://forum.kirupa.com/t/making-sure-an-array-reference-to-a-property-stays-up-to-date/309171>\
**Category:** flash\
**Created:** [May 8, 2010, 3:35pm UTC](https://forum.kirupa.com/t/making-sure-an-array-reference-to-a-property-stays-up-to-date/309171 "2010-05-08T15:35:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Boreez](https://avatars.discourse-cdn.com/v4/letter/b/3be4f8/32.png) [@Boreez](https://forum.kirupa.com/u/Boreez)\
**Post date:** [May 8, 2010, 3:35pm UTC](https://forum.kirupa.com/t/making-sure-an-array-reference-to-a-property-stays-up-to-date/309171/1 "2010-05-08T15:35:58Z")

</div>

Consider this for a second:

```auto
theState.stateGrowth = 0;
globalVariablesArray.push(theState.stateGrowth);

trace(globalVariablesArray[0]); // traces 0

theState.stateGrowth--;

trace(globalVariablesArray[0]); // still traces 0

```

Is there anyway to make it so that globalVariablesArray[0] always contains the ‘new’ value of theState.stateGrowth, _even if it changes_? In other words, store the property itself in the array, not just the value of it?

Thanks.
