Should i literally use module.exports.
on every variable that i want to export from a file ?
is there any way that, i don’t know this happens automatically or anything similar?
1 Like
nobody answered me in these 5 days , thanks to those whom seen and didn’t respond.
and i also found out the answer , no i don’t i can do =
const variable1 = 'value1';
const variable2 = 'value2';
const variable3 = 'value3';
module.exports = {
variable1,
variable2,
variable3
};
instead of =
// variables.js
const variable1 = 'value1';
const variable2 = 'value2';
const variable3 = 'value3';
(exports) or (module.exports).variable1 = variable1;
(exports) or (module.exports).variable2 = variable2;
(exports) or (module.exports).variable3 = variable3;
i’m also gonna give my self the solution tick because i found it myself and accept no complains about it
1 Like