<p>Actionscript 3.0 (and I assume Javascript and ECMAScript in general) lacks pass-by-reference for native types like ints. As a result I'm finding getting values back from a function really clunky.  What's the normal pattern to work around this?  </p>

<p>For example, is there a clean way to implement <em>swap( intA, intB )</em> in Actionscript?</p>

If ActionScript works like Javascript,
```
```
[a,b] = [b,a]
```
```