How to warn a variable name, not a variable value?
var color = 'red'; alert(color); // Will alert 'red' alert(/* magic */); // Will alert 'color'
This is not possible in JavaScript, because arguments in this language are passed by value or by reference, not by name, so when a variable is passed to a function, its name is lost.
In the Firebug console:
>>> a=[] [] >>> a [] >>> b=a [] >>> a.push(3) 1 >>> b [3] >>> a [3]
So, what variable name would you like to return to this array? a ? b ? Is something completely different?
a
b
Source: https://habr.com/ru/post/1307233/More articles:Dates ruby โโMongoDB - ruby โโ| fooobar.comMatlab, an index from the starting location to the last index - indexingHow to measure how long a function works in Matlab? - matlabAmazon as an e-commerce site and recommendation system - recommendation-engineHow to select the latest record in mysql? - phpIs this a design template? - c #Does natural language know well to help with programming? - language-agnosticClass reflection in .NET creates methods that differ only in modifier - c #.NET equivalent of httpunit - .netCurious: can LLVM be used for z-machine Infocom code, and if so, how? (in general) - performanceAll Articles