chain functions directly to newly created object instance in Javascript
<p>In my ongoing saga to understand more about Object Oriented Javascript - I came across a question about creating a class to respond to the following API:</p>

<pre><code>var foo = new bar().delay(750).start().then(onComplete);

var bar = function() {
    this.delay(function(per) {
      //...
    };
}
</code></pre>

<p>Can someone with more experience than me please describe how to create class that would respond to this? I have never seen chaining like this and can't find any information online :(</p>
