Skip to content

Instantly share code, notes, and snippets.

@hungvietdo
Last active July 22, 2016 18:17
Show Gist options
  • Save hungvietdo/8a962b3f02cf2bbb6120d8a3a073777e to your computer and use it in GitHub Desktop.
Save hungvietdo/8a962b3f02cf2bbb6120d8a3a073777e to your computer and use it in GitHub Desktop.
selfcall
license: gpl-3.0
<!DOCTYPE html>
<html>
<body>
<script type="text/javascript">
var abc = 1234;
</script>
<!-- First anonymous function called-->
<script type="text/javascript" src="selfcall.js"></script>
<script type="text/javascript">
var abc = 5678;
</script>
<!-- Second anonymous function called-->
<script type="text/javascript" src="selfcall.js"></script>
</body>
</html>
(function () {
console.log(abc);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment