Let's say I have the following code:
(function () {
var secret = "a very secret string";
})();
Is it possible for any other scripts running on the page to access the variable secret? I know the end-user can easily access this variable by opening up the JavaScript debugger, but this is ok. My concern is that this script will be running as a third-party script and I don't want to leak any of the user's session information to the page that embeds my script.