title: Javascript If condition to check a variable with empty object or not
body: <p>I have a variable var a = {};</p>
  
  <pre><code>if ( a !==null) {
  // Entering here if var a has empty object but i don't want to enter.
  }
  
  if (a == null) {
  // Want to enter into this condition if var a has empty object.
  }
  </code></pre>
  
  <p>I have tried several ways to write this condition like giving a=={} but it still entering first condition. Could you please let me know the appropriate way to check that condition?</p>