Skip to content

Instantly share code, notes, and snippets.

@LuisMDeveloper
Created February 6, 2014 18:55
Show Gist options
  • Save LuisMDeveloper/8850379 to your computer and use it in GitHub Desktop.
Save LuisMDeveloper/8850379 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<script>
var foo = "outside clsosure";
//alert(foo);
</script>
</head>
<body>
</body>
</html>
(function() {
var foo = "inside clsosure";
//alert(foo);
//alert(window.foo);
function deleteDB(){
alert("db deleted");
}
if(confirm("Are you sure that want to delete the database ")){
deleteDB();
} else {
alert(location);
}
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment