Guest User

Untitled

a guest
Nov 22nd, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. // foo.js
  2. var calc = require('./calc.js');
  3.  
  4. var a = 3, b = 5;
  5. console.log(calc.calc(a, b));
  6.  
  7. // math.js
  8. module.exports {
  9. calc: function(a, b) {
  10. // I need to call another function which does the math right here.
  11. }
  12. }
  13.  
  14. // math.js
  15. module.exports {
  16. calc: function(a, b) {
  17. function b(a, b) {
  18. return a+b;
  19. }
  20. }
  21. }
Add Comment
Please, Sign In to add comment