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

file creation using fs

parent bfb00487
Branches
No related tags found
No related merge requests found
function displayMessage() {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve("Hello, this is a promise message!");
}, 2000);
});
}
displayMessage().then(message => console.log(message)).catch(err => console.error(err));
{
"name": "nodeassignment1",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment