title: What's the most reliable way to check if a JavaScript variable is null?
body: <p>What is the mos reliable way if I want to check if the variable is null or is not present?.  </p>
  
  <p>There are diferent examples:</p>
  
  <pre><code>if (null == yourvar)
  
  if (typeof yourvar != 'undefined')
  
  if (undefined != yourvar)
  </code></pre>