right to left evaluation, left to right chain methods
<p>The expression inside the following function is evaluated right to left</p>

<pre><code>function foo(){

var a = b = c;

}
</code></pre>

<p>so it's like it was typed this way</p>

<pre><code>var a = (b = 0)
</code></pre>

<p>However, when methods are chained together, they are read left to right. The methods in this object...</p>

<pre><code>var obj = {
   value: 1,
   increment: function () {
       this.value += 1;
       return this;
  },
  add: function (v) {
      this.value += v;
     return this;
  },
  shout: function () {
      alert(this.value);
  }
};
</code></pre>

<p>can be called like this, evaluated left to right</p>

<pre><code>obj.increment().add(3).shout(); // 5
</code></pre>

<p>// as opposed to calling them one by one</p>

<pre><code>obj.increment();
obj.add(3);
obj.shout(); // 5
</code></pre>

<p>So, I think I know when to read left to right and right to left, but is there a rule that I need to know which I don't know?</p>
