Probably a duplicate of this question.
Silly javascript question: I want to check if an object is the emtpy object.
I call empty object the object that results from using the empty object literal, as in:
 var o = {};
As expected, neither == nor === work, as the two following statements
 alert({}=={});
 alert({}==={});
give false.
Examples of expressions that do not evaluate to the empty object:
- 0
- ""
- {a:"b"}
- []
- new function(){}
So what is the shortest way to evaluate for the empty object?
 
     
     
     
     
     
     
    