filmov
tv
JavaScript Promises Explained In 10 Minutes
![preview_player](https://i.ytimg.com/vi/Sp9cPxhJgi4/maxresdefault.jpg)
Показать описание
In this tutorial, we'll talk about JavaScript Promises and how you can use them in your code.
JavaScript Promises Explained in 10 Minutes
------------------------------------------------------------------------
00:00 Introduction
02:13 Creating a new Promise
03:09 Resolving promises
04:00 Rejecting Promises
— Follow Me —
— Thanks! —
So this JavaScript tutorial will take you through the basics of what JavaScript Promises are and give you some example of how to use them in your code.
There are a few similarities with the callback vs Promise JavaScript approaches and at the start of the video we'll take a look at the differences between callbacks and Promises and see how Promises provide you with a nice interface for handling asynchronous code.
So we'll take a look at the JavaScript callback vs Promise approach and then we'll move on to creating JavaScript Promises and see how you can use the provided resolve and reject functions that are passed in to a new JavaScript Promise to provide either a success of failure approach depending on the result of a particular operation.
You'll see in the video how JavaScript Promises handle asynchronous code gracefully and we'll also take a some of the other built in function available to work with multiple promises in JavaScript.
Finally, we'll take a look at the fetch API to examine how it uses JavaScript Promises and explain how each function actually returns a Promise and how these Promises can be chained together.
JavaScript Promises Explained in 10 Minutes
------------------------------------------------------------------------
00:00 Introduction
02:13 Creating a new Promise
03:09 Resolving promises
04:00 Rejecting Promises
— Follow Me —
— Thanks! —
So this JavaScript tutorial will take you through the basics of what JavaScript Promises are and give you some example of how to use them in your code.
There are a few similarities with the callback vs Promise JavaScript approaches and at the start of the video we'll take a look at the differences between callbacks and Promises and see how Promises provide you with a nice interface for handling asynchronous code.
So we'll take a look at the JavaScript callback vs Promise approach and then we'll move on to creating JavaScript Promises and see how you can use the provided resolve and reject functions that are passed in to a new JavaScript Promise to provide either a success of failure approach depending on the result of a particular operation.
You'll see in the video how JavaScript Promises handle asynchronous code gracefully and we'll also take a some of the other built in function available to work with multiple promises in JavaScript.
Finally, we'll take a look at the fetch API to examine how it uses JavaScript Promises and explain how each function actually returns a Promise and how these Promises can be chained together.
Комментарии