Skip to content
Snippets Groups Projects
Commit 2a7bb4b1 authored by Bhavyarani Suvarna's avatar Bhavyarani Suvarna
Browse files

Added file using fs module

parent 1a396190
No related branches found
No related tags found
No related merge requests found
const fs = require('fs').promises;
async function createFile() {
try {
await fs.writeFile("message.txt", "This file is created using fs module!");
console.log("File created successfully.");
} catch (error) {
console.error("Error creating file:", error);
}
}
createFile();
\ No newline at end of file
This file is created using fs module!
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment