Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2017
574
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Please Note that this is just an example. Im not actually using it like this I just want to learn how I would go about it.
  2. //File A
  3. function randint(){
  4.     var number = Math.floor(Math.random() * (d[1] - 0)) + 1;
  5. };
  6.  
  7. //File B
  8. const functions = require("./fileA");
  9. //How can I run the function from that file and others if there was more?
  10. console.log(number);
  11. var sum = number + number;
  12. console.log(sum)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement