title: CoffeeScript variable initialization: Why?
body: <p>I've been playing with CoffeeScript, and I've used <a href="http://js2coffee.heroku.com/" rel="nofollow">js2coffee</a> to experiment. One thing I noticed was the way CoffeeScript handles variable initialization. This CoffeeScript:</p>
  
  <p><code>string = 'word'</code></p>
  
  <p>compiles to this JavaScript:</p>
  
  <pre><code>var string;
  string = 'word';
  </code></pre>
  
  <p>What is the advantage of the <code>var string;</code> declaration? Why not</p>
  
  <p><code>var string = 'word';</code></p>