Empty Object Evaluates Truthy

by mmansion

JavaScript

var obj = {};

if(obj) {
    document.write('true');
} else {
    document.write('false');
}