Javascript array in external file? [duplicate]
Solution 1:
Discord.js
is based on NodeJS
, so:
blacklist.js :
module.exports =
[
"1",
"2",
"3"
]
app.js :
const blacklist = require('./blacklist.js');
blacklist.forEach(word => { console.log(word) });