So I'm trying to make fs module object oriented and i made this method it returns undefined
but when i remove it and run it it works. whats wrong?
readFileAsync = () => {
fs.readFile(this.filename, (err, data) => {
if (err) {
throw new err;
} else {
return data.toString();
}
})
}