Skip to content
Snippets Groups Projects
Commit 7b24ebb6 authored by Nitesh Verma's avatar Nitesh Verma
Browse files

Initial commit

parents
Branches
No related tags found
No related merge requests found
index.js 0 → 100644
const displayMessage = () => {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve("Hello, this is a Promise message!");
}, 1000);
});
};
// Calling the promise
displayMessage().then(console.log).catch(console.error);
{
"name": "promise-project",
"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