promisejs.org - Promises

Example domain paragraphs

Consider the following synchronous JavaScript function to read a file and parse it as JSON. It is simple and easy to read, but you wouldn't want to use it in most applications as it is blocking. This means that while you are reading the file from disk (a slow operation) nothing else can happen.

The core idea behind promises is that a promise represents the result of an asynchronous operation. A promise is in one of three different states:

Once a promise is fulfilled or rejected, it is immutable (i.e. it can never change again).

Links to promisejs.org (6)