I want to check if an object has only one property or only two properties and no other property in javascript.
Suppose I have an object like this.
cons