Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Web Technology by (55.6k points)

Can anyone tell me what is promise in Node Js?

1 Answer

0 votes
by (119k points)

A Promise in Node is just an enhancement to callback functions, an action that will either be completed or rejected. In case of completion, the promise is kept and if not, the promise is broken as the word suggests either the promise is kept or it is broken.

Here is the basic syntax of a promise:

var promise = doSomethingAync()

promise.then(onFulfilled, onRejected)

If you want to learn Node Js from an online course, you can register for this Node Js Training Course by Intellipaat that provides instructor-led training, hands-on projects, certification, and job assistance.

Also, watch this video on Node Js:

Related questions

0 votes
1 answer
0 votes
1 answer
asked Sep 9, 2020 in Web Technology by Sudhir_1997 (55.6k points)
0 votes
1 answer
asked Sep 9, 2020 in Web Technology by Sudhir_1997 (55.6k points)
0 votes
1 answer
asked Sep 9, 2020 in Web Technology by Sudhir_1997 (55.6k points)
0 votes
1 answer
asked Jun 17, 2020 in Web Technology by Sudhir_1997 (55.6k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...