How can I check if 2 variables with the same value are the same variable?
For example in the below code I created 2 variables with the same values and i pass:
function check_var(v){
// Check if "v" (string) came from a or b
}
let a = "string";
let b = "string";
check_var(b);
I able to install v8 engine locally and change the the source code, but i am looking for more easy way to do it.
One way to do it is if I had a method in javascript that returns a unique value for each variable based on the variable name.
One more way to solve the problem is by logging all the javascript actions, by doing that i could see after the code executed if var a is the var that got into the check_var
function.