title: What's the best way to initialize empty variables in JS?
body: <p>If I know the variable will be object later, I use:</p>
  
  <pre><code>var obj;
  </code></pre>
  
  <p>but it doesn't really matter if I initialize it as null or undefined:</p>
  
  <pre><code>var obj = null;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>var obj = undefined;
  </code></pre>
  
  <p>For strings I personally use:</p>
  
  <pre><code>var str = '';
  </code></pre>
  
  <p>as later on I can do </p>
  
  <pre><code>str += 'some text';
  </code></pre>
  
  <p>and if I use null for example I get "nullsome text".</p>
  
  <p><code>null, undefined, empty string or 0</code> are all <code>falsy</code> values so to check if they are defined. which is the correct way to initialize variables if my variable will be used as <code>object, dom node, etc</code>.. ?</p>