Skip to content

Instantly share code, notes, and snippets.

@msusur
Created February 26, 2015 06:07
Show Gist options
  • Save msusur/057383af9192fd032b7f to your computer and use it in GitHub Desktop.
Save msusur/057383af9192fd032b7f to your computer and use it in GitHub Desktop.
Javascript that fails
var x = function () {
alert("working");
};
(function () {
x();
})();
<html>
<head>
<script src="b.js" ></script> <!-- B -->
<script src="a.js" ></script> <!-- A -->
</head>
</html>
<html>
<head>
<script src="a.js" ></script> <!-- A -->
<script src="b.js" ></script> <!-- B -->
</head>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment