title: How to check for undefined in javascript?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3390396/best-way-to-check-for-undefined-in-javascript">Best way to check for “undefined” in JavaScript?</a>  </p>
  </blockquote>
  
  
  
  <p>I want to make an if statement that if the value is not defined then let it go through.</p>
  
  <p>I tried</p>
  
  <pre><code>if (something != "undefined")
  </code></pre>
  
  <p>and </p>
  
  <pre><code>if (something !== "undefined")
  </code></pre>
  
  <p>However it seems to go into the <code>if</code> statement no matter what. If it is undefined it goes through. If it is defined it goes through. Am I doing something wrong?</p>