var object = {}; // Global Object
(function() {
var theArg, google, yahoo;
object.google = function(arg) {
theArg = arg;
alert(theArg);
}
object.yahoo = function() {
alert(theArg);
}
module.exports = yahoo;
})();
// This will set initial value of
google("Hello World");
Can i call something like this module.exports = yahoo; and calling the yahoo function else where.
You can use:
test.js
main.js