Let's assume we have the following code:
const myVariable = { age: 7, name: "Hunter" };
I want to know the name of the variable, not just the value of it, and put it in a string or log it or:
const s = nameof(myVariable) + ': ' + JSON.stringify(myVariable);
And the result I want to see is sth like:
"myVariable: {"age":7,"name":"Hunter"}"
Looking forward to see your solution.