re: Node.js: Breaking JavaScript out of the browser since 2009 VIEW POST

VIEW FULL DISCUSSION

fs.write('devto.txt', 'Hello World', err => console.log(err));

wrong function, you need to use writeFile, the previos one takes file description as a first input argument.

Whoops! My bad! Thank you for that. I have corrected the error.

code of conduct - report abuse