JavaScript Promises Explained In 10 Minutes

preview_player
Показать описание
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.

Рекомендации по теме
Комментарии
Автор

By far the best explanation I have seen so far. Thank you so much for being short and precise

kolyxix
Автор

Thank you! Never understood them until now!

Stevesteacher
Автор

Excellent. I would also like for you to explain in future videos how the EventLoop works, which functions get executed first, second - queue, priority and those things.

Elator
Автор

Thank you very much for this. I have been struggling to understand this until now. It took me an hour to get through but was well worth it. Do you have any courses?

billz
Автор

can you make a practice video about promises? TY

creativemask
Автор

Hey can you please make me a video on stripe payment or PayPal using node JS

_.sunnyraj._
Автор

I want to be computer system engineer but i don't have any idea what should i do now to be excellent
I'm 14 years old
So can you help me in that??
Thank you

aidoudaayedi
Автор

Please zoom code.. not viable in mobile..

kodakstudiowebs