Logical operators and valueOf

var a = {
    value: false,
    valueOf: function(){
        return this.value;
    }
};


alert(!a);