Get variable names with JavaScript
<p>I want to create a log function where I can insert variable names like this:</p>

<pre><code>var a = '123',
    b = 'abc';

log([a, b]);
</code></pre>

<p>And the result should look like this in the console.log</p>

<pre><code>a: 123
b: abc
</code></pre>

<p>Get the value of the variable is no problems but how do I get the variable names? The function should be generic so I can't always assume that the scope is window. </p>
