The Nodejs platform is founded on a programming paradigm of asynchronous events and callbacks. This can be tricky if you’re not used to it.
Sometimes, you need some order in your life (and code), and that’s where Promises can help. A Promise ensures that an asynchronous function will eventually complete (successfully or not), and when it does, to then run another function.
Check out these two excellent lessons on Promises