This is my code currently:
const fs = require("fs")
var content = "";
fs.readFile("./CP/m.txt", 'utf8', function (e,d) { content=d })
console.log(content)
However, it says content is empty. How can I keep the console.log out of the callback function but make it set the value to the content of the file?