title: When do I initialize variables in JavaScript with null or not at all?
body: <p>I have seen different code examples with variables declared and set to undefined and null. Such as:</p>
  
  <pre><code>var a; // undefined - unintentional value, object of type 'undefined'
  var b = null; // null - deliberate non-value, object of type 'object'
  </code></pre>
  
  <p>If the code to follow these declarations assigns a value to a or to b, what is the reason for using one type of declaration over another?</p>