const fs = require("fs") fs.writeFileSync('read.txt' , "hello world ") code example Example: const fs = require("fs") fs.writeFileSync('read.txt' , "hello world ") hello world