pass class variable by reference in an arg
<p>So I'm trying to do the following;</p>

<pre><code>var myVar;  

function testFunction(args){  
args.cacheVar = new Date();  
}  

testFunction({cacheVar:myVar});
</code></pre>

<p>but instead of changing the value of myVar, its changing the value of args.cacheVar.
What I would like to happen is for myVar = new Date(). not args.cacheVar.</p>

<p>How can I accomplish this with my current setup? (using arguments)</p>
