i am rohn

thoughtfully linking code

Promises... Promises... Promises...

JavaScript is asynchronous and event-driven. Operations that take a lengthy amount of time are non-blocking - you don’t want to call a function and block until it completes. Instead you provide a callback, which is executed (or invoked) when the lengthy function completes. This is efficient and friendly, avoiding the need for threading, but gets a bit harder to implement when you have a series of operations that need to be executed one after another. This is where the Promise pattern comes in.