create file object node js
const fs = require('fs');
const fileName = 'example.txt'; const fileContent = 'This is an example file content.';
fs.writeFile(fileName, fileContent, (err) => { if (err) throw err; console.log('File has been created'); });
const fs = require('fs');
const fileName = 'example.txt'; const fileContent = 'This is an example file content.';
fs.writeFile(fileName, fileContent, (err) => { if (err) throw err; console.log('File has been created'); });