title: understanding a simple return this in transit.js
body: <p>I am relatively very new to js and basically I came across the following function in transit.js, a small animation library.  Have a look at the function below: </p>
  
  <pre><code>function Transform(str) {
      if (typeof str === 'string') { this.parse(str); }
      return this;
    }
  </code></pre>
  
  <p>Now <code>this.parse(str)</code>, is basically calling a fucntion which is attached to the prototype of <code>Transform</code>, you can see that function on <strong><a href="https://github.com/rstacruz/jquery.transit/blob/master/jquery.transit.js#L422" rel="nofollow">LINE 422</a></strong>.</p>
  
  <p>Now my question here is about <code>this</code>, I have read a few articles online, which show how return this can be used for chaining, but I am not really sure in this instance what return this is returning. </p>
  
  <p>When you say <code>return this</code> in this specific scenario, what do you specifically mean to return? what exactly. </p>
  
  <p>I kind of understand that return this working a bit like so: </p>
  
  <ul>
  <li>you pass an object, variable or something to a function </li>
  <li>the function executes the steps </li>
  <li>you return the new object or variable using <code>return this</code>.</li>
  </ul>
  
  <p>But I am still not clear, can somebody make this crystal clear for me, by taking my example and explaining using the examples context?</p>
  
  <p>P.S. I am not asking to explain return this but I am asking to explain return this in the given context. </p>