April 5, 2013 Promise & Deferred objects in JavaScript Pt.1: Theory and Semantics. Introduction # In the not too distant past the primary tool available to JavaScript programmers for handling asynchronous events was the callback. A callback is a piece of executable code that is passed as an argument to other code, which is expected to call back ( execute ) the argument at some convenient time — Wi