Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
writefile
node v18.11.0
version:
2.0.1
endpoint
share
tweet
const fs = require('node:fs'); const content = 'Some content!'; fs.writeFile('/test.txt', content, err => { if (err) { console.error(err); } else { // file written successfully } });
Loading…
no comments
sign in
to comment