Understanding Promises in Node.js

Опубликовано: 27 Январь 2021
на канале: Hey Node
1,502
22

See the written version of this tutorial for links to prerequisites and related tutorials: https://heynode.com/tutorial/what-are...

A Node.js Promise is a placeholder for a value that will be available in the future, allowing us to handle the result of an asynchronous task once it has completed or encountered an error. Promises make writing asynchronous code easier. They’re an improvement on the callback pattern and very popular in Node.js. Introduced as a standard part of JavaScript with ES6, Promises are used in ES8 async functions as building blocks.

In this tutorial we'll:

Start to understand what Promises are in Node.js
Learn how to create and work with Promises, and why they’re used in standard modern Web APIs

Heynode.com: The best online Node.js courses and tutorials to help you solve hard problems fast.