function LoadMapFromText(route){
var str = '';
fs.readFile(route, (err, data) => {
str = data.toString();
});
var pairs = str.split("-n");
console.log(str);
}
ive been trying to fix this problem for god knows how long, and i just don't know how to do it. the string is not updating from inside the arrow function.
i already tried making the function async, and i already tried putting await before fs.readFile, but to no avail. i am at a loss of what to do.