example:
var something = "some text";
test(something);
function test(param){
printParamName(param);
}
//console
"something"
I want to print in console: "something" the name of variable which I pass to that call to test function.
UPDATE
The variable is in a file and the function is in another file...
It's to complicate to explain the reason.... but I want to avoid to hardcode parameter of another function which is in test function for example.
file1:
var something = "some text";
test(something);
file2:
function test(param){
var something = anotherFunctionCall('something'); //I want to put here nameof var something.
var somethingElse = anotherFunctionCall('somethingElse');
}
file3:
another component "anotherFunctionCall"
I want to avoid that hardcoded name. I want to pass name throw that function.