PROGRAMING
Promise is a new feature in Javascript for achieve asynchronous programming, which one invented at ES6.
Yes, to make program/application faster and helps improve performance by allowing handle multiple tasks simultaneously without waiting each one to complete.
There is a several way to use Promise.
Suppose u have two function one is imageHandling and another one is videoHandling. Lets create first promise object by using new Promise. Promise class accept an anonymous function with two parameter first one indicate successful and second one failed operation. In the anonymous function write imageHandling code. Next u should access then method by using promise object and handle respose. Same way write videoHandling code with another promise object.
Read what excites, achieves and moves us Read what excites, achieves and moves us