Skip to content
Snippets Groups Projects
Commit 9709b3c1 authored by Prasad Bhat's avatar Prasad Bhat
Browse files

Created a Node.js project and a promise to display a message.

parents
No related branches found
No related tags found
No related merge requests found
index.js 0 → 100644
const myPromise = () => {
return new Promise((resolve, reject) => {
const message = "This is a message from a promise!";
resolve(message);
});
};
myPromise().then((message) => {
console.log(message);
});
\ No newline at end of file
{
"name": "promise",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment