learning how to use promises in javascript
because of Nathan's answer in stackoverflow, i am now trying to learn how to use promises in javascript
http://stackoverflow.com/a/13585086/80353 Quote Nathan: The better solution if you're going to be dealing with more asynchronous things later on would be to refactor your code using promises. Promises is an API designed for dealing with asynchronous programming in a systematic and organized way.
It'll make your life a lot easier if you're going to be doing more async work. There's a lot of free libraries that support promises, one of the major players is Q.js.