SyntaxFix
Write A Post
Hire A Developer
Questions
It is returning a Buffer object.
If you want it in a string, you can convert it with data.toString():
data.toString()
var fs = require("fs"); fs.readFile("test.txt", function (err, data) { if (err) throw err; console.log(data.toString()); });