title: Check if a variable is in the scope or not in Javascript
body: <p>I need to check if a object "objCR" is present in the current scope or not.
  I tried using below code.</p>
  
  <pre><code>if(objCR == null)
  alert("object is not defined");
  </code></pre>
  
  <p>Let me know where I am wrong.</p>