filmov
tv
Promises in Javascript || Promises || Promises in less than 5 minutes || JS || ReactJS

Показать описание
In this tutorial, you'll learn how to use promises to handle asynchronous events. You'll see how to make a promise, wait for its fulfillment and handle errors using callback functions.
Writing asynchronous JavaScript code can be tricky. You need to distinguish between asynchronous and synchronous code, you need to write callback functions in a particular way, handle errors, provide assurances that your code will not fail. In this course we’ll introduce JavaScript promises, a useful new feature in ES6 that simplifies doing asynchronous programming in Javascript.
A promise can be thought of as giving an object that you'll get at some point in the future, and it may take a while to come true. There are lots of ways to use promises in real-world software: A web service can make a promise that it will send you some information at some point in the future, but you can't interact with the web service until it's finished doing its work. Other times, you need to write your code in such a way that a callback function will be executed when an asynchronous operation finishes. But even if there's no API involved, you still may have started a long-running operation that might never complete. In these cases, your code needs to know when or how long things will take place. ⭐⭐⭐⭐⭐⭐⭐⭐⭐
💻💻💻💻💻💻
Writing asynchronous JavaScript code can be tricky. You need to distinguish between asynchronous and synchronous code, you need to write callback functions in a particular way, handle errors, provide assurances that your code will not fail. In this course we’ll introduce JavaScript promises, a useful new feature in ES6 that simplifies doing asynchronous programming in Javascript.
A promise can be thought of as giving an object that you'll get at some point in the future, and it may take a while to come true. There are lots of ways to use promises in real-world software: A web service can make a promise that it will send you some information at some point in the future, but you can't interact with the web service until it's finished doing its work. Other times, you need to write your code in such a way that a callback function will be executed when an asynchronous operation finishes. But even if there's no API involved, you still may have started a long-running operation that might never complete. In these cases, your code needs to know when or how long things will take place. ⭐⭐⭐⭐⭐⭐⭐⭐⭐
💻💻💻💻💻💻