I want to change value variable in an index.js in another file, but i can't do that and this is my code example
index.js
var length = 0;
client.commands.get('join').excute(length);
anotherfile.js
module.exports = {
name: 'join',
description: "",
excute(length){
length++;
}
length in index.js is + 1 = 2, but length in anotherfile.js is not
I imported anotherfile.js to index.js
So how i can change value in length variable
Thank you so much and sorry for my bad english