title: How to check 'undefined' value in jQuery
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/27509/detecting-an-undefined-object-property-in-javascript">Detecting an undefined object property in JavaScript</a><br>
    <a href="https://stackoverflow.com/questions/2778901/javascript-undefined-compare">javascript undefined compare</a>  </p>
  </blockquote>
  
  
  
  <p>How we can add a check for an undefined variable, like:</p>
  
  <pre><code>function A(val) {
    if (val == undefined) 
      // do this
    else
      // do this
  }
  </code></pre>