Is there any way to make an object return false in javascript?
var obj = new Object(); console.log(!!obj) // prints \"true\" even if it\'s empty
Object-to-boolean conversions are trivial. All objects (including arrays and functions) convert to true. This is so even for wrapper objects (new Boolean(false)) is an object rather than a primitive value, and so it converts to true.
new Boolean(false)