0
function printVariableName(name){
   console.log()//Here variable name should be printed...    
}
Suresh Kamrushi
  • 15,627
  • 13
  • 75
  • 90
  • Can you elaborate on why you need to have the string representation of the name of an instance variable...? – esqew Mar 10 '21 at 05:41
  • 2
    Duplicate of [Variable name as a string in Javascript](https://stackoverflow.com/questions/4602141/variable-name-as-a-string-in-javascript) – esqew Mar 10 '21 at 05:41
  • I think this is the answer as well: https://stackoverflow.com/questions/47468361/get-variable-name-into-string-in-javascript/47468674 – Miu Mar 10 '21 at 05:47

0 Answers0