Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
my-node
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Harshith Karkera
my-node
Merge requests
!1
Initial commit: promise implementation added
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Initial commit: promise implementation added
main
into
master
Overview
0
Commits
1
Pipelines
0
Changes
2
Merged
Harshith Karkera
requested to merge
main
into
master
4 months ago
Overview
0
Commits
1
Pipelines
0
Changes
2
merge main to master
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
ddafcc92
1 commit,
4 months ago
2 files
+
27
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
index.js
0 → 100644
+
15
−
0
View file @ ddafcc92
Edit in single-file editor
Open in Web IDE
// Creating a Promise
const
myPromise
=
new
Promise
((
resolve
,
reject
)
=>
{
setTimeout
(()
=>
{
resolve
(
"
Hello World
"
);
},
1000
);
// Simulating an async operation with setTimeout
});
// Calling the Promise
myPromise
.
then
((
message
)
=>
{
console
.
log
(
"
Message:
"
,
message
);
// Display the message
})
.
catch
((
error
)
=>
{
console
.
error
(
"
Error:
"
,
error
);
});
Loading