Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // foo.js
- var calc = require('./calc.js');
- var a = 3, b = 5;
- console.log(calc.calc(a, b));
- // math.js
- module.exports {
- calc: function(a, b) {
- // I need to call another function which does the math right here.
- }
- }
- // math.js
- module.exports {
- calc: function(a, b) {
- function b(a, b) {
- return a+b;
- }
- }
- }
Add Comment
Please, Sign In to add comment