Hello, I’m using the fs.writeFile function, here is my code:
fs.writeFileSync('database.json', JSON.stringify(tasksArray), (err) => {
if (err) throw err;
else console.log("The files was added".white.bgGreen)
})
It is working, however it’s not console logging “The file was added”, why is that happening if error is not occuring?