Some people beieved that this is a duplicate of Variable name as a string in Javascript, this is incorrect. If you read the test below, you would understand that the methods provided were not satisfactory since this variable HAS to be a variable, it cannot be an object property.
I have been looking around for "How to convert variable name to string", but all I got was(as explained in How to convert variable name to string in JavaScript?) objects and things that only worked in the global scope.
Is there a way to convert a variable name DIRECTLY into a string, without doing weird stuff.
like:
var alertThis = "dont alert this"
alert(alertThis.forVarToString());
// This should return "alertThis"
This functionality is quite necessary for what I am doing.