Last active
December 21, 2021 08:52
-
-
Save appcypher/2c210cd04774f1812a4b3e5c84496858 to your computer and use it in GitHub Desktop.
Accessing the Global Scope
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function main() { | |
const { log } = Tera; | |
log.info(">>> authenticating ..."); | |
return true; | |
})() // Close the parens prematurely. | |
// Do globally things. | |
var leak = 5; | |
// Create an open parens that matches the closing parens. | |
(function() { return true; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function main() { | |
const { log } = Tera; | |
log.info(">>> middlewaring ..."); | |
log.info(">>> leak =", leak); // Access previously leaked value | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment