JS does not have public/private variables, but everything is accessible from pretty much anywhere.
Is it possible to check what other variables reference another variable?
var firstVar = "Hello";
someObject.secondVar = firstVar;
checkReferences(someObject.secondVar);
=> firstVar
Or something along these lines.