This post covers the necessary fundamentals to having a good understanding of promise. It covers resolve, reject, callbacks and chaining in ECMAScript 6.
One of the most important concepts of JavaScript is execution context. Let’s define global, function and eval execution contexts and see some examples.
A closure is the combination of a function bundled together with references to its surrounding state. It’s a simple and useful technique once you understand it.