Skip to content

Instantly share code, notes, and snippets.

@icaromh
Last active August 22, 2017 20:19
Show Gist options
  • Save icaromh/b7651ce47e349c8b4a7178c0030bab56 to your computer and use it in GitHub Desktop.
Save icaromh/b7651ce47e349c8b4a7178c0030bab56 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Installer</title>
</head>
<body>
<script src="installer.js">
var Installer = {
init: function(){
Installer.run();
},
run: function(params){
console.log(params);
},
calcula: function(a, b){
return a + b;
}
};
</script>
<script src="outro.js">
Installer.run(); // fica disponível
var resultado = Installer.calcula(1, 2);
console.log(resultado) // 3
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment