Skip to content

Instantly share code, notes, and snippets.

@oliverwebr
Last active June 11, 2020 23:19
Show Gist options
  • Save oliverwebr/6c0e5d530da0406ee0a713107324c2fb to your computer and use it in GitHub Desktop.
Save oliverwebr/6c0e5d530da0406ee0a713107324c2fb to your computer and use it in GitHub Desktop.
JavaScript Closures with Examples Explained - 3
(function () {
let myLuckyNumber = 5;
function main() {
debugger;
// the debugger statement sets a breakpoint, when your
// developer-tools are open your application will stop here
console.log(myLuckyNumber);
}
main();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment