How to convert variable name to string in JavaScript?
<p>I am new to stackoverflow but I found it pretty helpful several times. Now I have my own question: Is there a way to convert variable names to strings in javascript? To be more specific:</p>

<pre><code>var a = 1, b = 2, c = 'hello';
var array = [a, b, c];
</code></pre>

<p>Now at some point as I go through the array, I need to get variable names (instead of their values) as strings - that would be 'a' or 'b' or 'c'. And I really need it to be a string so it is writeable. How can I do that?</p>

<p>Thank you</p>

<p>jirkap</p>
