Last active
November 24, 2015 16:21
-
-
Save lesniakania/5c7ec45e97cee21452ee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// calculator.js | |
(function(root) { | |
var calculator = { | |
sum: function(a, b) { return a + b; } | |
}; | |
root.Calculator = calculator; | |
})(this); | |
// app.js | |
console.log(Calculator.sum(1, 2)); // => 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
not
Calculator.sum
?