title: JavaScript - How/Can I set an object reference to null from a function?
body: <p>I'm wondering if this is even possible. Basically I have a couple objects that I pass to a function, and under certain conditions I want that function to set the object to null.</p>
  
  <p>Ex.</p>
  
  <pre><code>var o = {'val' : 0};
  
  f = function(v)
  {
     v = null;
  };
  
  f(o);   // Would like this to set 'o' to null
  </code></pre>
  
  <p>Unfortunately it seems I can only set the function's argument to null. After calling the function 'o' will still refer to an object.</p>
  
  <p>So, is it even possible to do this? And if so, how?</p>