title: CoffeeScript Class Members
body: <p>I am new to CoffeeScript (and rather inexperienced with JS too; so sorry if this is naive) and I was trying to create a class as below:</p>
  
  <pre><code>class Test
     a: []
  
     make: -&gt;
         @a.push ['A', 'B', 'C']
  
     getdata: -&gt;
         output = ""
         for i in @a
            output += i
         output
  
  b = new Test
  b.make()
  
  alert(b.getdata())
  
  
  c = new Test
  c.make()
  
  alert(c.getdata())
  </code></pre>
  
  <p>The output I get is:
      "A, B, C"
      "A, B, C, A, B, C"</p>
  
  <p>Despite create a new instance of 'Test'; the array gets appended over and is not cleared. What am I doing wrong here? Am I initializing the member variable wrong?</p>