filmov
tv
What is Promise in Javascript tutorial for beginners
Показать описание
Today I will teach you what is promise in javascript.
Promises are using with asynchronous programming, and it's used to start an action, which takes time to resolve and return the value.
With promises, the action can be started and finished in the background without stopping other operations of the application.
It improves the performance and user experience of many web and mobile applications.
The promise may be in three states: pending, resolved with the value, or rejected with an error.
If the promise is resolved, we can call `then()` method and perform an action with the returned value.
In case the promise is rejected, we can use the `catch()` method to handle the errors.
Other methods for handling asynchronous programming are `async/await` and `callbacks`.
SUBSCRIBE to our channel and let's start!
For written article and code examples VISIT US on:
MEET US:
#promise #then #catch #javascript #js
Promises are using with asynchronous programming, and it's used to start an action, which takes time to resolve and return the value.
With promises, the action can be started and finished in the background without stopping other operations of the application.
It improves the performance and user experience of many web and mobile applications.
The promise may be in three states: pending, resolved with the value, or rejected with an error.
If the promise is resolved, we can call `then()` method and perform an action with the returned value.
In case the promise is rejected, we can use the `catch()` method to handle the errors.
Other methods for handling asynchronous programming are `async/await` and `callbacks`.
SUBSCRIBE to our channel and let's start!
For written article and code examples VISIT US on:
MEET US:
#promise #then #catch #javascript #js