It this javascript function possible?
<p>When debugging I often write something like <code>console.log("foo:"+foo+", bar:"+bar)</code> is it possible to write a function <code>logValues(foo,bar)</code> which would give the same output? Essentially I'm asking if there is a way to go from a variable to that variable's name. Do I have to setting for looping for an arguments array just using the index yielding  <code>[0]: 'value of foo, [1]: 'value of bar'</code> </p>

<p>Thanks for reading</p>
