there is no problem in creating a file in txt format, but when you create a file in js format, you will see that [object Object]
is written like this. IndustryReader is a [{}] Array (object) format
const industryReader = require("../reader.js")
industryReader[0].reader = parseInt(industryReader[0].reader)+1
fs.writeFile("reader.js",industryReader,function(err){
if (!err){
console.log("wrote data to file.txt")
}else{
throw err;
}
});