I am struggling hard to understand Promise object in javascript as this has been asked to me multiple times in interview and every time I just pass this question.
I have gone through many articles on google but haven’t got the insight on this topic.
Can you please make me understand and it’s significance.
As a beginner, the first thing you need to understand is what is going on in the core of most Javascript runtime engines, like in browsers or in Node.js. This video does a pretty good job explaining JS internals, especially the event loop.
Once you get that down and understood, then things like a promises should make a bit more sense. Basically, a promise lets you do asynchronous (and also synchronous) work and gives you the ability to better store and act on the results of that work.