title: CoffeeScript instance variable
body: <p>I'm learning CoffeeScript, and I've got one minor headache I haven't quite been able to figure out. If I create an object to do certain things, I occasionally need an instance variable for that object to be shared between methods. For instance, I'd like to do this:</p>
  
  <pre><code>testObject = 
  
    var message # &lt;- Doesn't work in CoffeeScript.
  
    methodOne: -&gt;
      message = "Foo!"
  
    methodTwo: -&gt;
      alert message
  </code></pre>
  
  <p>However, you can't use <code>var</code> in CoffeeScript, and without that declaration <code>message</code> is only visible inside <code>methodOne</code>. So, how do you create an instance variable in an object in CoffeeScript?</p>
  
  <hr>
  
  <p><strong>Update:</strong> Fixed typo in my example so the methods are actually methods :)</p>