Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //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.
- //File A
- function randint(){
- var number = Math.floor(Math.random() * (d[1] - 0)) + 1;
- };
- //File B
- const functions = require("./fileA");
- //How can I run the function from that file and others if there was more?
- console.log(number);
- var sum = number + number;
- console.log(sum)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement