How to know the name of a variable in JavaScript?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/9795773/get-variable-name-javascript-reflection">Get variable name. javascript &ldquo;reflection&rdquo;</a>  </p>
</blockquote>



<p>Is there a way to know the name of a variable?</p>

<p>Example:</p>

<pre><code>var a = 1;
var b = 4;

function getName(param){
    //What should I return here?
}
</code></pre>

<p>What I want to do, is to have <code>getName</code> return "a" if I call <code>getName(a)</code>and return "b" if I call <code>getName(b)</code></p>

<p>Is this possible?</p>
