// Adding from other files // main.js const variables = require("./variables.js"); variables.sleep(1000); // variables.js module.exports = { //add any functions or variables you want to export in here sleep } function sleep(time) { setTimeout(() => {}, time); }