For details of this example please see the javascript code…
More API details can be found here: https://github.com/briancavalier/when.js/wiki/Examples