title: get variable name into string in javascript
body: <pre><code>var abc = '123'
  
  var def = '456'
  </code></pre>
  
  <p>need to write <code>somefuntion()</code> which convert variable name into string </p>
  
  <p>like </p>
  
  <pre><code>alert ("value of" +somefuntion(abc) +"is"+ abc +"and value of" +somefuntion(def)+" is"+def );
  </code></pre>
  
  <p>should be like this </p>
  
  <pre><code>alert ("value of abc is 123 and value of def is 456")
  </code></pre>
  
  <p>i have searched and tried few solution 
  and idk how this link can help cuz i know you will say its duplicate but i tried it and it didnt work </p>
  
  <p><a href="https://stackoverflow.com/questions/19074583/how-to-turn-variable-name-into-string-in-js">How to turn variable name into string in JS?</a></p>